Accordion

DarkInspect

Rows that open to say more: a help page's questions, an item's care notes, the footer's link groups on a phone. shadcn's Accordion on Base UI, with our look on top: a text-lg font-semibold title on py-4, never smaller than what it opens to, a large muted chevron at its end, and a line between rows.

Examples

Several open

multiple keeps every opened row open, for panels read side by side. Without it, opening one row folds the last away.

DarkInspect

With a control

A row can end on a switch or a badge, as the cookie preferences do: pass it as the trigger's action. The chevron then moves to the start, so the control and the chevron never share an edge, and the panel sits in the title's column: indented under the title and stopping short of the control. The control sits beside the trigger, not in it, since a control can't nest in a button.

DarkInspect

Anatomy

<Accordion>
  <AccordionItem value="ship">
    <AccordionTrigger>When do I have to ship?</AccordionTrigger>
    <AccordionContent>Before the deadline on the order.</AccordionContent>
  </AccordionItem>
</Accordion>