Accordion
Add Accordions to your documentation
We use cookies
Essential cookies keep the app working. Optional analytics, support, and marketing cookies help us improve the site and services. Cookie Policy.
Add Accordions to your documentation
import React from 'react';
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Accordions type="single">
<Accordion title="My Title">My Content</Accordion>
</Accordions>;You can specify an id for accordion. The accordion will automatically open when the user is navigating to the page with the specified id in hash parameter.
<Accordions>
<Accordion title="My Title" id="my-title">
My Content
</Accordion>
</Accordions>The value of accordion is same as title by default. When an id presents, it will be used as the value instead.