Components/Switch
Switch
Toggle control for binary settings. Renders an accessible checkbox styled as a switch.
Installation
npx ajaxui add switchSizes
States
Props
| Prop | Type | Default |
|---|---|---|
| switchSize | "sm" | "md" | "lg" | "md" |
| label | string | — |
| description | string | — |
| checked | boolean | — |
| disabled | boolean | false |
| onChange | (e: ChangeEvent) => void | — |