Components
A toggle is a UI element that lets users switch between two or more states or options, like an on/off switch.
8 Variants
16 Variants
96 Variants
1128 Variants
36 Variants
340 Variants
336 Variants
960 Variants
86 Variants
70 Variants
128 Variants
100 Variants
2404 Variants
16 Variants
256 Variants
12 Variants
20 Variants
50 Variants
896 Variants
196 Variants
784 Variants
840 Variants
149 Variants
22 Variants
50 Variants
1792 Variants
64 Variants
6 Variants
256 Variants
64 Variants
580 Variants
144 Variants
36 Variants
7 Variants
441 Variants
8 Variants
14 Variants
12 Variants
16 Variants
32 Variants
The Toggle in Emvi UI is a binary control that quickly switches between two opposing states (on/off). It is optimized for instantaneous configuration changes (e.g., enable notifications, dark mode, activate/deactivate a rule) where the action takes effect immediately without extra confirmations.
The component supports size variants (SM/MD/LG), densities (compact/comfortable), states (on/off, hover, focus, disabled, loading), and theme styles (light/dark). Color, type, and spacing tokens ensure visual consistency across the system. The design emphasizes state legibility, WCAG accessibility, and semantic clarity, distinguishing Toggle from other patterns (checkbox, radio, button) due to its instant nature.
A typical Toggle includes:
- Track: the on-rail area; communicates state using color/contrast.
- Thumb/Handle: circular/oval knob sliding between off/on.
- Label and optional description: provide context; the label area should be clickable.
States:
- Off / On (default)
- Hover / Visible Focus (ring/halo)
- Pressed/Active (momentary feedback)
- Disabled (no interaction, retains legibility)
- Loading (subtle spinner within thumb or track)
- Immediate action: Toggles apply changes instantly; no "save" required.
- Clear binary context: represent persistent/long-lived states (e.g., enable 2FA).
- Not for single-shot actions: prefer Button for momentary triggers.
- Not for multi-select lists: prefer Checkbox for sets of options.
- Focus & keys: Tab to focus, Space/Enter to toggle. Provide clear labeling when on/off meaning isn't obvious.
A toggle is a user interface element that enables users to switch between two or more states or options. The most common example of a toggle is a switch, which can be turned on or off. This simple interaction allows users to control settings and preferences easily.
Toggles enhance user control by providing a straightforward way to change states. Whether it's enabling or disabling features, switching modes, or selecting options, toggles make these actions intuitive. Their binary nature—on or off, selected or unselected—ensures that users can make changes quickly and confidently.
Toggles are versatile and can be used in various applications, from setting preferences in mobile apps to controlling device settings on websites. They are particularly useful in forms and settings menus where users need to make quick adjustments. Our UI kit includes customizable toggle components that can be easily integrated into any design, ensuring a user-friendly and efficient interface.
Use a Toggle for immediate persistent settings (on/off). Use a Checkbox for selections that usually require confirmation (Save) or belong to multi-select groups.