Join our Discord community
Accordion

Chevron Accordion

Collapsible content panels with chevron indicators. Perfect for React applications requiring FAQ sections with Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

npx shadcn@latest add https://www.shadcn.io/registry/accordion-01.json
npx shadcn@latest add https://www.shadcn.io/registry/accordion-01.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/accordion-01.json
bunx shadcn@latest add https://www.shadcn.io/registry/accordion-01.json

Features

  • Collapsible content sections with smooth expand/collapse animations using Radix UI primitives
  • Chevron indicators that rotate to show open/closed state with visual feedback
  • Single or multiple panel expansion modes with configurable behavior
  • Keyboard navigation with full accessibility support including ARIA attributes
  • TypeScript support with complete interface definitions and IntelliSense
  • shadcn/ui integration using consistent design tokens and styling patterns

Use Cases

This free open source React component works well for:

  • FAQ sections - Common questions and answers built with Next.js and TypeScript
  • Documentation interfaces - Organized content sections using Tailwind CSS styling
  • Settings panels - Collapsible configuration options for React applications
  • Feature comparisons - Expandable product details with shadcn/ui design consistency

API Reference

Accordion01

PropTypeDefaultDescription
type'single' | 'multiple'requiredWhether single or multiple items can be expanded
collapsiblebooleanfalseWhether expanded items can be collapsed
defaultValuestring | string[]undefinedDefault expanded item(s)
valuestring | string[]undefinedControlled expanded item(s)
onValueChange(value: string | string[]) => voidundefinedCallback when expanded items change

Accordion01Item

PropTypeDefaultDescription
valuestringrequiredUnique identifier for this accordion item

Accordion01Trigger

PropTypeDefaultDescription
childrenReactNoderequiredContent to display in the trigger button

Accordion01Content

PropTypeDefaultDescription
childrenReactNoderequiredContent to display when expanded

Implementation Notes

  • Uses Radix UI Accordion primitive for robust accessibility features
  • Chevron rotation and content animations handled automatically
  • Compatible with shadcn/ui design system and Tailwind CSS
  • Supports both controlled and uncontrolled usage patterns
  • All components accept standard React props and className overrides