Switch

Buttons

An accessible animated toggle switch with spring thumb animation, size variants, label support, and keyboard interaction.

Loading preview...
Customize
Size:
Checked
Label
Disabled

Props

PropTypeDefaultDescription
checkedbooleanfalseWhether the switch is checked.
onChange(checked: boolean) => voidundefinedCallback when the switch is toggled.
labelstringundefinedLabel text displayed next to the switch.
size'sm' | 'md' | 'lg''md'Size variant of the switch.
disabledbooleanfalseDisables the switch.
classNamestring''Additional CSS classes.