Switch

The Switch component is used to switch between two options and the result of the change is immediate.

Default

The Switch component is used as an alternative for the Checkbox component. Except indeterminate and label are not supported.

Small

When using switch in tight spaces inside of other components, use the small size.

Disabled

Disabled switches can appear as selected or unselected.

Props

  • checked boolean

    When true, the switch is checked (on)

  • defaultChecked boolean

    When true, the switch is true by default

  • disabled boolean

    When true, the switch is disabled