TrademarkTrademark
Docs
Ctrl k
Search docs...
Form Controls

Switch

Updated: October 18, 2026
View on GitHub
Soon
Not released yet. This is on main and is not in any published version yet. It will not install today.

Switch is a 40 by 24 track with a knob that slides to the end when on. A tap anywhere on the row, label included, toggles it. See the web Switch for the same component in the browser.

Controlled

Pass checked and update it in onToggle, which gets the next state.

Uncontrolled

Loading and reversed

loading shows a spinner in the knob and ignores taps, for a setting that is saving. reverse puts the switch after the label, as a settings list does.

Differences from the web

  • The handler is onToggle(checked). There is no name, value or form submission.
  • The knob widens while pressed, in place of the hover state.
  • A switch without a label takes taps from 44pt around it. Give it ariaLabel so screen readers can name it.

API reference

Prop
Type
Default
Description
checkedbooleanThe state, when the screen owns it.
defaultCheckedbooleanfalseThe first state when the switch keeps its own.
onToggle(checked: boolean) => voidCalled with the next state.
labelReactNodeText beside the switch. A string is also the accessibility label.
descriptionReactNodeA line under the label.
loadingbooleanfalseShows a spinner in the knob and ignores taps.
disabledbooleanfalseDims the switch and ignores taps.
reversebooleanfalsePuts the switch after the label.
ariaLabelstring"Toggle switch"The accessibility label when label is not a string.
styleViewStyleStyle for the row.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club