Back to library

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 elementTypeExample initial valueDescription
<details open>Boolean attributeFirst section openSet which sections are expanded initially.
<summary>Element—Provide a short, keyboard-operable label for each section.

States

StateTriggerResult
openActivate a summary.That section reveals its body. Other sections keep their current state.
closedActivate an expanded summary.The content collapses and focus stays on the summary.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-border-widthlength 1pxThickness of the outline.
--q-spacelength 4pxBase unit for gaps and padding.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.