ONONC

Switch

Accessible toggle with a spring thumb.

a11yform

Styled with ONONC's design tokens — shadcn add installs them for you.

Customize

Checked
Disabled
Accessible label

Props

PropTypeDefaultDescription
checkedboolean—Controlled on/off state.
defaultCheckedbooleanfalseInitial state when uncontrolled.
onCheckedChange(checked: boolean) => void—Fired on toggle.
disabledbooleanfalseDisable interaction.
labelstring—Accessible label (aria-label).
classNamestring—Extra classes.