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
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
Prop | Type | Default | Description |
---|---|---|---|
type | 'single' | 'multiple' | required | Whether single or multiple items can be expanded |
collapsible | boolean | false | Whether expanded items can be collapsed |
defaultValue | string | string[] | undefined | Default expanded item(s) |
value | string | string[] | undefined | Controlled expanded item(s) |
onValueChange | (value: string | string[]) => void | undefined | Callback when expanded items change |
Accordion15Item
Prop | Type | Default | Description |
---|---|---|---|
value | string | required | Unique identifier for this accordion item |
Accordion15Trigger
Prop | Type | Default | Description |
---|---|---|---|
children | ReactNode | required | Content to display in the trigger button |
Accordion15Content
Prop | Type | Default | Description |
---|---|---|---|
children | ReactNode | required | Content 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
Card Left Plus Accordion
Collapsible content panels with card-style borders and left-aligned plus/minus indicators. Perfect for React applications requiring navigation-style tab sections with animated controls and Next.js integration and TypeScript support.
Table Plus Accordion
Collapsible content panels with table-style borders and animated plus/minus indicators. Perfect for React applications requiring tabular data with seamless row connections and Next.js integration and TypeScript support.