Accordion
A vertically stacked set of expandable sections.
Yes. It is built on Bits UI and follows WAI-ARIA patterns.
Yes, with the single unified lily style — no theme variants.
Of course — you own the source once you add it.
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Copy the accordion source from the registry into $lib/components/ui/accordion.
Usage
<script lang="ts">
import {
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent
} from '$lib/components/ui/accordion';
</script>
<Accordion type="single">
<AccordionItem value="item-1">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>Yes. It follows WAI-ARIA patterns.</AccordionContent>
</AccordionItem>
</Accordion>