Switch.
Accessible animated on/off control.
The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.
Props & API reference
Parameters available in the shared component, including value types, requirements and accepted options.
| Parameter | Type | Required | Default | Possible values | Description |
|---|---|---|---|---|---|
checked | boolean | No | — | true · false | Controlled enabled/disabled state. |
defaultChecked | boolean | No | false | true · false | Initial uncontrolled state. |
disabled | boolean | No | false | true · false | Disable interaction. |
onChange | ChangeEventHandler<HTMLInputElement> | No | — | — | Called when toggled. |
aria-label | string | No | — | — | Accessible switch name. |