• Start
  • Blogg
  • Kom igång
  • Riktlinjer
  • Komponenter
  • Changelog
  • Tillgänglighet
  • Statistik
  • Inställningar

Komponenter

Komponenter

​
​

Inga resultat hittade, prova med andra sökvillkor.

Switch Card

Switch Card

5.0.0

Switches toggle the state of a single item on or off.

Demo
Props
Installation
Länkar
Tillgänglighet
Change log
Statistik

Demo

Props

Se fullständing dokumentation(öppnas i ny flik)
NamnTypBeskrivning

active *

booleanIndicates if the card is currently active.

children

ReactNode

customAttribute

{ attribute: string; value: string | number }Used for tests. Clickable and requested subcomponents will be suffixed with "-[ComponentName]".

disabled

booleanIf true, the component is disabled.

elevation

numberElevation of the card.

error

booleanIndicates if the component is in an error state, applying error-specific styling for validation feedback.

id *

stringA unique ID for the switch. Necessary for WCAG compliance

isLoading

booleanIf true, a loading skeleton will be rendered instead of the component.

limitedClickArea

booleanIf the card should limit the interactive area to the top portion. Needed for accessibility if lower portion contains another interactive element

onChange

(event: ChangeEvent) => voidChange event handler

primaryText *

stringPrimary text

secondaryText

stringOptional secondary text displayed below the primary text.

skeletonSx

SxPropsCustom styles for Skeleton.

Installation

Kodexempel
npm install @sj-ab/component-library.ui.switch-card

Länkar

  • Storybook

  • Figma

  • Bit.cloud

Tillgänglighet

Se riktlinjerna för tillgänglighet för den vanliga Switch-komponenten

Tillgängligt namn

Switch Card får sin uppläsning av den synliga texten i kortet, det vill säga primaryText och secondaryText

Change log

  • Update to MUI 7

    5.0.0

    Breaking

  • Fix for buggy padding in SwitchCard.

    4.1.4
  • Fix hover style in SwitchCard component

    4.1.1
  • Update error state color in cards

    4.1.0
  • Visual updates and prop fixes in card components

    4.0.0

    Breaking

Statistik

  • Importer av Switch Card

    9
  • Repos med Switch Card

    22%
  • Senaste installerade version av Switch Card

    5.0.0
  • Äldsta installerade version av Switch Card

    4.1.2