Skip to content

Accordion

Disclosure cards — chevron + title row that expands to reveal content. Group several to render as one bordered card.

Installation

npx nimbus-docs add accordion

Preview

A docs framework where components copy into your repo and pages ship a markdown alternate for agents.

Run nimbus-docs add <slug> — the component plus its registry dependencies are copied into src/components/ui/.

Yes — they live in your repo. Edit Tailwind classes, layout, or props with no upstream API to break.

<AccordionGroup>
<Accordion>
  <AccordionTrigger>What is Nimbus?</AccordionTrigger>
  <AccordionContent>
    A docs framework where components copy into your repo and pages ship a markdown alternate for agents.
  </AccordionContent>
</Accordion>
<Accordion>
  <AccordionTrigger>How do I install a component?</AccordionTrigger>
  <AccordionContent>
    Run `nimbus-docs add <slug>` — the component plus its registry dependencies are copied into `src/components/ui/`.
  </AccordionContent>
</Accordion>
<Accordion>
  <AccordionTrigger>Can I edit the components?</AccordionTrigger>
  <AccordionContent>
    Yes — they live in your repo. Edit Tailwind classes, layout, or props with no upstream API to break.
  </AccordionContent>
</Accordion>
</AccordionGroup>

Examples

Solo

A single standalone Accordion — useful when the disclosure isn’t part of a list.

Agents read the .md siblings without parsing HTML chrome. Every page in src/content/docs/ gets one for free.

<Accordion>
<AccordionTrigger>Why does Nimbus ship a markdown alternate?</AccordionTrigger>
<AccordionContent>
  Agents read the .md siblings without parsing HTML chrome. Every page in `src/content/docs/` gets one for free.
</AccordionContent>
</Accordion>

Default open

Pass open on an Accordion to start expanded.

Useful when the first item carries the most important answer.

<Accordion open>
<AccordionTrigger>Already open</AccordionTrigger>
<AccordionContent>
  Useful when the first item carries the most important answer.
</AccordionContent>
</Accordion>

API reference

Every prop the component accepts, sourced from a single declaration.

Prop Type
open
boolean
Components

Type to search…

↑↓ navigate ↵ select Esc close