Skip to Content
Layout & Disclosure@hacline/ui/accordion

Accordion

Expand and collapse content sections under a shared set of headings.

Usage

Click any question to reveal its answer. Use defaultValue to specify items expanded by default; each AccordionItem has its own value.

Send invites from the Members page in project settings.

Expanding Multiple Items

Enable multiple to keep several panels open at once, using a controlled array to expand and collapse all items together.

Three review rounds completed.

Parts

PartDescription
AccordionHeader
A heading around the trigger, so screen readers can move between items by heading.
AccordionItem
One item: a header with its trigger, and the panel the trigger opens.
AccordionPanel
The content its item's trigger shows and hides.
AccordionTrigger
The button that opens and closes its item's panel. Put it inside the item's AccordionHeader.

Props

Prop

Type

View UI SDK parts and state attributes.