Toggle
Navigation
TabsLayout
Tiered PageActions
Toggle
A pressable element that switches between two states · on and off.
$ npx verticallyworks add toggleDesign question
Does the binary on/off axis conflict with vertical reading direction, or does its perpendicular orientation provide useful contrast?
Default
A vertical list: two cells stacked as columns flowing right-to-left, each reading top→bottom. The toggle runs on that same axis · thumb up = on · so the control matches the reading direction instead of cutting across it. The preview updates live.
Source
The exact file npx verticallyworks add toggle copies into your project · yours to edit. Styling comes entirely from the design tokens.
Guidance
Do
- Run the toggle on the reading axis · thumb up = on, matching how the eye moves
- Always pair with a label that explains current state effect
- Use haptic feedback on state change in native implementations
Don't
- Rotate a horizontal toggle with transform · build the vertical travel natively
- Use color alone to convey state
- Place toggle labels vertically unless they are single CJK characters