Switch

On/off toggle control.

Usage

Bind checked for two-way state. The switch is fully keyboard and screen-reader accessible out of the box.

Sizes

Three sizes from the size prop.

States

Checked on, checked off, and disabled. The disabled prop blocks all interaction while keeping the current visual state.

Props

Plus all Bits Switch.Root props via prop spreading.

PropTypeDefault
size 'sm' | 'md' | 'lg''md'
checked Bindable toggle state.booleanfalse
class Extra classes merged onto the root.string