Skip to content
Theme

Switch

An on/off setting that takes effect at once.

Examples

Off, on and disabled

Props

Switch

An on/off setting that takes effect at once, unlike a checkbox submitted with a form.

PropTypeDefaultDescription
childrenReactNode—

Also takes 103 props it passes to the underlying React Aria component or element (events, ARIA attributes, state such as isDisabled), documented by React Aria.

Keyboard

KeyDoes
SpaceToggles it

Accessibility

  • Announced as a switch, on or off.
  • The thumb moves toward the inline end, so it mirrors in right-to-left text.