Switch
An on/off control that takes effect immediately. Three sizes, grey or brand when on, with an optional glyph in the thumb and soft rings; also as a label row or a card.
Add an Orvain Switch, medium, off, grey style.
When to use#
- For a setting that applies as soon as it changes: dark mode, notifications, a feature flag.
- As a card when each setting needs an icon, an avatar or a logo.
When not to use
- Use a Checkbox for an option that applies only when a form is submitted.
Anatomy#
Medium 44×24, Small 37×20, x-Small 29×16; #f2f2f2 off, #2a2a2a or #005cf8 on.
White, 18, 16 or 12px, with a soft deep shadow; slides to the end when on.
Optional: a cross when off, a tick when on.
Optional halos 3px and 6px out.
A title in H5 18/500 with sub-label, badge and description; the card is 360px, radius 12.
States#
Hover darkens the track: #070707 grey, #0042b7 brand.
While pressed on, the thumb shrinks 2px.
Off, or on in either colour.
Off: white with a hairline and a flat grey thumb. On: faded to 20%.
The label row and card keep the value but cannot change it.
Source#
The Switch ships in the free packages, @orvain/react and @orvain/vue, and in the Figma library with every variant and state shown above. The code on this page is the code you install.
Used in these blocks

