Accordion

Collapsible sections with animated expand/collapse and proximity hover in grouped mode.

Installation

npx shadcn@latest add https://fluid-functionalism.vercel.app/r/accordion.json

Standalone

A single collapsible item with its own hover state.

A collapsible accordion with animated expand/collapse and spring-animated chevron.

Single Expand

Multiple items with proximity hover — only one can be expanded at a time.

Install the component and import it into your project. The accordion supports both single and multiple expand modes.

Multi Expand

Multiple items with proximity hover — several can be expanded at once.

Multiple items can be expanded at the same time.
Each item operates independently in multiple mode.

API Reference — Accordion / AccordionGroup

PropTypeDefaultDescription
type"single" | "multiple""single"Whether one or multiple items can be expanded.
collapsiblebooleantrueAllow collapsing all items when type is single.
defaultValuestring | string[]Initially expanded item value(s).
valuestring | string[]Controlled expanded value(s).
onValueChange(value) => voidCallback when expanded state changes.

API Reference — AccordionItem

PropTypeDefaultDescription
valuestringUnique identifier for this item.
indexnumberPosition index for proximity hover. Required inside AccordionGroup, omit for standalone.
disabledbooleanfalseWhether this item is disabled.

API Reference — AccordionTrigger

PropTypeDefaultDescription
childrenReactNodeTrigger label content.

API Reference — AccordionContent

PropTypeDefaultDescription
childrenReactNodeCollapsible content.