Switch
Use a switch for a setting that takes effect as soon as it’s turned on or off, such as notifications.
Focus mode
Recommended API
| Property or element | Type | Example initial value | Description |
|---|---|---|---|
aria-checked | ARIA Boolean | true | Expose whether Focus mode is enabled. |
name / form value | Form attributes | focus-mode / on | Include the enabled setting in form data. |
States
| State | Trigger | Result |
|---|---|---|
on or off | Activate the switch. | The setting changes immediately and the form value follows. |
CSS variables
| Variable | Type | Default | Description |
|---|---|---|---|
--q-text | color | #28302a | Main text and foreground color. |
--q-muted | color | #70776f | Color for secondary text. |
--q-font-size | length | 13px | Base size for the component text. |
--q-accent | color | #344e41 | Accent for active controls, indicators and focus. |
--q-on-accent | color | #ffffff | Foreground on the accent background. |
--q-surface | color | #ffffff | Surface for controls and cards. |
--q-border | color | #dce0d8 | Color for outlines and dividers. |
--q-border-width | length | 1px | Thickness of the outline. |
--q-gap | length | calc(var(--q-space) * 2) | Space between items, based on the spacing unit. |
--q-duration | time | 175ms | Duration of visual state transitions. |
--q-space | length | 4px | Base unit for gaps and padding. |