Integrated ResearchPicasso
Components

Accordion

Sections that expand in place, for content most people will not need to read.

{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}

Sections that expand in place, for content most people will not need to read.

Import

import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@ir/ui";

Watch out

  • Figma's axis is Type (FAQ | Default); here it is variant, because Radix's Root already owns type for single-versus-multiple open. The values keep Figma's names.

Props

Takes the props of the element it renders, and nothing of its own — styling is the component's business, not the caller's.

Do and don't

faq (plus/minus) for answers that appear; default (chevrons) for sections that unfold.

Don't — Pick the icon pair by taste.

This is the only thing the axis changes, and it is the only signal people get about what the control will do.

Collapse what most people will skip — edge cases, detail, history.

Don't — Hide the thing the page is about behind a closed section.

Anything collapsed is not found, not read and not searchable on the page. That is the cost of every closed row.

Say what is inside — the trigger is the only thing visible when closed.

Don't — Write "More" or "Details" on the trigger.

A closed accordion is a list of its own labels. If the labels say nothing, the list says nothing.

Single for comparison-free reading, multiple when people cross-reference sections.

Don't — Default to multiple open just to avoid choosing.

Single keeps the page short; multiple keeps two answers side by side. Which one is right depends on the reading, not the component.

Put the divider above each item after the first.

Don't — Add a rule under the last item to close the list off.

The rule separates items. A trailing one draws a line under nothing.

Accessibility

  • Radix sets aria-expanded and aria-controls on the trigger and the region on the panel. Do not add your own.
  • The chevron is aria-hidden, so the trigger's text is its entire accessible name — a trigger with only an icon has none.
  • Focus is a 2px ring offset against bg/app. :focus-visible clears the browser outline globally, so a trigger without the ring has no focus indicator at all.

Where it is drawn

Figma — structure from figma, measurements from figma.

Open in Storybook

On this page