Lorem ipsum dolor sit amet
import { Accordion } from "#/ui/components/Accordion"
<Accordion
items={[
{
title: "How does it work?",
content:
"Easy, just copy and paste the code into your project and tweak it to match your needs",
},
{
...
}
]}
/>
The accordion is built up of multiple items. These can be used individually if you need, either a single accordion item or to allow more Customisation.
import { AccordionItem } from "#/ui/components/Accordion"
Easy, just copy and paste the code into your project and tweak it to match your needs
<AccordionItem title="How does it work?" className="w-96" client:load>
Easy, just copy and paste the code into your project and tweak it to match your needs
</AccordionItem>
You can pass any component or jsx as a child to the AccordionItem
<AccordionItem title="How does it work?" className="w-96" client:load>
<Button size="sm">Example Button</Button>
</AccordionItem>
Classes can be passed to both the Accordion and AccordionItem components, which will apply styling to the root element of the component.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<AccordionItem
title="How does it work?"
className="bg-gray-100 rounded-t-lg px-8 w-full"
client:load
>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</AccordionItem>