Accordion
Expand individual sections in an FAQ or keep supporting details tucked away.
What makes a good interface?
Clear intent, thoughtful defaults, and the small details that help you feel at home.
Can I make it my own?
Every component shares your design tokens.
Recommended API
| Property or element | Type | Example initial value | Description |
|---|---|---|---|
<details open> | Boolean attribute | First section open | Set which sections are expanded initially. |
<summary> | Element | — | Provide a short, keyboard-operable label for each section. |
States
| State | Trigger | Result |
|---|---|---|
open | Activate a summary. | That section reveals its body. Other sections keep their current state. |
closed | Activate an expanded summary. | The content collapses and focus stays on the summary. |
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-border | color | #dce0d8 | Color for outlines and dividers. |
--q-border-width | length | 1px | Thickness of the outline. |
--q-space | length | 4px | Base unit for gaps and padding. |
--q-gap | length | calc(var(--q-space) * 2) | Space between items, based on the spacing unit. |