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

PropTypeDefaultDescription
checkedbooleanfalseWhether the toggle is on.
onChange(checked: boolean) => voidundefinedCallback fired when the toggle state changes.
labelstringundefinedOptional text label displayed next to the toggle.
size'sm' | 'md' | 'lg''md'Toggle size variant.
disabledbooleanfalseDisable interaction.
classNamestring''Additional CSS classes.