An animated FAQ accordion with expandable panels, powered by Motion. A React component for shadcn/ui.
Made by AxylInstallation
File Structure
Usage
For custom content per item, pass a React node as content or compose with the compound API:
Props
Accordion
| Prop | Type | Default |
|---|---|---|
allowMultiple? | boolean | false |
duration? | number | 0.8 |
iconMode? | "rotate" | "fade" | "both" | "both" |
iconRotation? | number | -180 |
ease? | [number, number, number, number] | expo.inOut |
disabledOn? | ("mobile" | "tablet" | "desktop")[] | - |
items? | { id?: string; title: string; content: React.ReactNode; defaultOpen?: boolean; enableStagger?: boolean }[] | - |
className? | string | - |
AccordionItem
| Prop | Type | Default |
|---|---|---|
defaultOpen? | boolean | false |
delay? | number | 0 |
duration? | number | - |
ease? | [number, number, number, number] | - |
iconRotation? | number | - |
disabledOn? | ("mobile" | "tablet" | "desktop")[] | - |
enableStagger? | boolean | false |
staggerDuration? | number | 0.6 |
staggerDelay? | number | 0.15 |
staggerEase? | [number, number, number, number] | expo.out |
staggerYPercent? | number | 110 |
staggerStartDelay? | number | 200 |
onOpen? | () => void | - |
onClose? | () => void | - |
When to Use
Use the Accordion for FAQ sections, settings panels, or any content group where users need to scan multiple topics quickly and expand only the ones they care about. It works well when you have 4–12 items of similar importance and collapsing them reduces cognitive load — for example, product feature breakdowns, pricing tier details, or support documentation.
Avoid it when all items need to be visible at once, or when there are fewer than 3 items (a simple list or card layout is clearer).
Accessibility
AccordionTrigger renders as a native <button>, so keyboard navigation (Tab, Enter, Space) works without extra configuration. Each panel region gets an aria-expanded attribute and is linked to its trigger via aria-controls. When prefers-reduced-motion: reduce is active, expand and collapse animations are skipped while the items remain fully interactive.
Credits
Inspired by Annnimate. Reimplemented for Motion and React.
Built by Axyl. A motion-first component registry for React.
Last updated: 8/20/2026