Animated Toggle
Buttons
A switch toggle with spring-animated knob, multiple sizes, ARIA role='switch', keyboard support, and disabled state.
Loading preview...
Customize
Size:
Checked
Label
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Whether the toggle is on. |
onChange | (checked: boolean) => void | undefined | Callback fired when the toggle state changes. |
label | string | undefined | Optional text label displayed next to the toggle. |
size | 'sm' | 'md' | 'lg' | 'md' | Toggle size variant. |
disabled | boolean | false | Disable interaction. |
className | string | '' | Additional CSS classes. |