Accordions

Use accordions for FAQs, optional explanations, and advanced notes that should stay collapsed by default.

Accordions are useful when a page includes optional context that should not interrupt the main flow.

Use in MDX

Add an Accordion block inside your .mdx article:

<Accordion title="Where do docs categories live?">
  Categories live in `src/data/docs.ts`.
</Accordion>

Implementation notes

The component lives in src/components/docs/Accordion.astro. Update that file and the .docs-accordion* styles in src/index.css if you want a different disclosure pattern.

Preview

First accordion item

Use this for optional setup context that should stay collapsed until the reader needs it.

Second accordion item

Accordions work well for FAQs, advanced notes, platform-specific caveats, and extra implementation detail.

Third accordion item

The component is already registered for MDX, so you can drop it into any docs article without extra setup.

Where do docs categories live?

Categories live in src/data/docs.ts.