Join our Discord community
Accordion

Table Chevron Accordion

Collapsible content panels with table-style borders and seamless connected rows. Perfect for React applications requiring tabular data presentation with negative spacing and Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

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

Features

  • Table-style connected borders with negative spacing creating seamless row appearance
  • Rounded corner management for first and last items with proper table edge handling
  • Enhanced focus states with z-index management and ring visibility controls
  • Precise typography with specific font size and line height for tabular consistency
  • Background isolation with proper layering for connected border appearance
  • shadcn/ui integration using consistent design tokens and Tailwind CSS styling

Use Cases

This free open source React component works well for:

  • Data tables with details - Expandable rows for additional information built with Next.js
  • FAQ sections - Question lists with seamless table presentation using TypeScript
  • Settings panels - Configuration options in tabular format for React applications
  • Documentation sections - Help content with table-like organization using Tailwind CSS

API Reference

Accordion15

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

Accordion15Item

PropTypeDefaultDescription
valuestringrequiredUnique identifier for this accordion item

Accordion15Trigger

PropTypeDefaultDescription
childrenReactNoderequiredContent to display in the trigger button

Accordion15Content

PropTypeDefaultDescription
childrenReactNoderequiredContent to display when expanded

Implementation Notes

  • Uses -space-y-px for negative spacing creating seamless table-like row connections
  • Focus states managed with has-focus-visible:z-10 ensuring proper layering and visibility
  • First and last items have rounded corners with first:rounded-t-md last:rounded-b-md
  • Precise typography with text-[15px] leading-6 for optimal table-style readability
  • Background color isolation prevents border overlap issues in connected layout
  • Compatible with shadcn/ui design system and Tailwind CSS utility classes