Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Accordion

<Accordion> and <AccordionGroup> are content blocks that start collapsed.

Collapsible content built on native <details>, so it works without JavaScript. <AccordionGroup> merges several accordions into one bordered group.

<AccordionGroup>
  <Accordion title="Which package managers are supported?" icon="lucide:package" defaultOpen>
    npm, pnpm, and yarn can all install `bitidocs` globally.
  </Accordion>
  <Accordion title="Which Node.js version do I need?" description="A line of text below the title">
    22.13 or later.
  </Accordion>
  <Accordion title="Can only one be open at a time?" name="faq">
    Give accordions in the same group the same `name`; opening one automatically closes the others.
  </Accordion>
</AccordionGroup>
Which package managers are supported?

npm, pnpm, and yarn can all install bitidocs globally.

Which Node.js version do I need?A line of text below the title

22.13 or later.

Can only one be open at a time?

Give accordions in the same group the same name; opening one automatically closes the others.

Accordion props

titlestringRequired
Title.
descriptionstring
Subtitle below the title.
defaultOpenbooleanDefault false
Open by default (open also works).
iconicon
Icon before the title.
idstring
Anchor id, generated from the title by default; visiting #id opens it automatically.
namestring
Exclusive group name: only one accordion with the same name is open at a time.

Alias: <Collapse>.