Toggle

Forms

A switch control for boolean settings that take immediate effect — no confirmation required.

Preview

Props API

PropTypeDefaultDescription
labelstring"Enable notifications"Text label displayed next to the toggle
checkedbooleanfalseWhether the toggle is in the on state
sizeselect"sm" | "md" | "lg""md"Size of the control
disabledbooleanfalsePrevents user interaction
descriptionstring""Secondary descriptive text below the label

Usage

Use toggles only for settings that apply immediately without a save action. For anything requiring confirmation — or in a form that needs to be submitted — use a Checkbox instead.

Accessibility

  • Uses role="switch" with aria-checked to communicate state to screen readers.

  • Keyboard accessible — Space or Enter toggles the state.

  • The visible label is always associated with the control via aria-labelledby.