Join our Discord community
Accordion

Subtitle Accordion

Collapsible content panels with main titles and descriptive subtitles. Perfect for React applications requiring detailed section headers with Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

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

Features

  • Title and subtitle layout with flexible content structure for enhanced information hierarchy
  • Chevron rotation animation providing clear visual feedback for expand/collapse states
  • Vertical text stacking with proper spacing using flexbox column layout
  • Optional subtitle rendering with conditional display based on prop availability
  • Typography differentiation with distinct font weights for title and subtitle elements
  • shadcn/ui integration using consistent design tokens and Tailwind CSS styling

Use Cases

This free open source React component works well for:

  • Settings panels - Configuration sections with detailed descriptions built with Next.js
  • Help documentation - FAQ sections with summary and explanation text using TypeScript
  • Feature descriptions - Product capabilities with headlines and details for React applications
  • Account sections - User settings with clear titles and descriptive text using Tailwind CSS

API Reference

Accordion07

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

Accordion07Item

PropTypeDefaultDescription
valuestringrequiredUnique identifier for this accordion item

Accordion07Header

PropTypeDefaultDescription
childrenReactNoderequiredContent to wrap in accordion header

Accordion07Trigger

PropTypeDefaultDescription
titleReactNoderequiredMain title text to display in the trigger
subtitleReactNodeundefinedOptional subtitle text to display below title

Accordion07Content

PropTypeDefaultDescription
childrenReactNoderequiredContent to display when expanded

Implementation Notes

  • Uses flexbox column layout with space-y-1 for proper title/subtitle spacing
  • Subtitle rendering is conditional based on prop availability with proper styling
  • Chevron icon rotates 180 degrees on expansion with smooth transitions
  • Font weight differentiation: semibold for title, normal for subtitle
  • Focus ring and keyboard navigation built-in for accessibility compliance
  • Compatible with shadcn/ui design system and Tailwind CSS utility classes