Expandable panels with a smooth height animation, single & multiple modes, and full keyboard support.
@akex/accordionnpm install @akex/accordion
import {
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from "@akex/accordion";
<Accordion type="single" defaultValue="a">
<AccordionItem value="a">
<AccordionTrigger>Is it accessible?</AccordionTrigger>
<AccordionContent>Yes — it follows the WAI-ARIA pattern.</AccordionContent>
</AccordionItem>
</Accordion>| Prop | Type | Default | Description |
|---|---|---|---|
| type | string | "single" | "single" closes others; "multiple" allows many open |
| defaultValue | string | string[] | — | Initially open item(s) when uncontrolled |
| value | string | string[] | — | Controlled open item(s) |
| onValueChange | (value: string[]) => void | — | Called with the new open values on every toggle |