Switch
On / off switch, isolated or grouped in a settings list.
In glass mode the track is a control-layer pane (brand-tinted while checked) and the knob a control-layer surface at whichever end the state puts it; the track, the label, the description and the hit target never move, and the checked state flips at once. A disabled switch is inert; solid mode keeps the skin's own knob.
Pass ref to access the interactive switch row, including its label. Use useRef<ComponentRef<typeof Switch>>(null) from React, or useRef<View>(null) with React Native's View type. Object and callback refs are supported and detach on unmount. Calling ref.current?.focus() or .blur() delegates to the host without activating the control. Browser focus is supported; native focus depends on the platform and React Native version, and is separate from accessibility focus.
On the web, Space activates the focused control on key release, and Enter also activates it. Holding Space does not repeat the change. Moving focus away, disabling the control, or composing text cancels a pending Space press.
Available to chat
iOS
Available to chat
Android
Available to chat
Web
tsx
Default
Off
With description
Disabled
Controlled
Settings list
Props
Do & Don’t
Off
Don’t
A washed-out off track reads as disabled, so users can't tell the switch is simply off versus locked.
Do
Two-factor auth
Keep the standard input-colored off track so off stays clearly interactive and distinct from a disabled control.
On
Don’t
A switch applies instantly; wiring an on toggle to an irreversible action invites accidental, unconfirmed data loss.
Do
Auto-save drafts
Reserve the on switch for instantly reversible settings; route irreversible actions through a button plus confirmation.
Label the setting
Don’t
An On/Off label duplicates what the switch position already shows.
Do
Notifications
Label the setting, not the state; the switch communicates on or off.