Prodular UI

Accordion

A stack of sections separated by hairlines that expand one or several at a time.

npx prodular-ui add accordion

Default

One open at a time. The first item opens by default.

You pay for active seats at the start of each cycle. Seats added mid cycle are prorated to the day and appear on the next invoice.

In a card

multiple lets several sections stay open. Icons and metadata sit inside the trigger.

Security and compliance
Workspace defaults set by your admins.

Anatomy

<Accordion defaultValue={["seats"]}>  <AccordionItem value="seats">    <AccordionTrigger>How are seats billed?</AccordionTrigger>    <AccordionContent>...</AccordionContent>  </AccordionItem></Accordion>

Guidance

Use it when

  • FAQs and help content where people read one answer at a time.
  • Long settings or details that most people do not need to see at once.

Avoid

  • Hiding content people need to compare side by side. Show it in a table.
  • Nesting accordions inside accordions.
  • A single item. Use Collapsible instead.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Give every AccordionItem a unique value. Pass defaultValue as an array of values to open items on load.
  • Pass multiple on Accordion when sections are independent, such as settings. Leave it off for FAQs.
  • Write triggers as questions or nouns in sentence case. Keep them to one line.
  • Do not add borders or backgrounds to items. Items are separated by hairlines already.
  • Put the accordion directly in CardContent when it lives in a card. Add border-t on Accordion if it follows other content.
  • Use variant="section" for inspector and property sections instead of restyling AccordionTrigger.
  • className on AccordionContent styles the content wrapper, text color included; use panelClassName for the animated panel itself.

API

Accordion

PropTypeDefaultDescription
multiplebooleanfalseAllows more than one item to be open.
defaultValueany[]Values of the items open on first render.
variant"default" | "section""default"section gives compact headers for inspector panels and property editors.

AccordionItem

PropTypeDefaultDescription
valueanyIdentifies the item.
disabledbooleanfalseBlocks opening the item.

AccordionContent

PropTypeDefaultDescription
panelClassNamestringClasses for the animated panel. className styles the content inside it, text color included.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add accordion# or, with the registry in components.jsonnpx shadcn@latest add @prodular/accordion

Used in these screens