Join our Discord community
Accordion

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.

Powered by

Loading component...

Installation

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

Features

  • Table-style plus/minus design combining connected borders with advanced animation sequences
  • Complex icon animations including rotation, opacity transitions, and path transformations on plus icon
  • Negative spacing layout with -space-y-px creating seamless table-like row connections
  • Enhanced focus management with z-index layering and ring visibility controls
  • Precise typography with specific font size, weight, and line height for tabular presentation
  • 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 expandable rows - Detailed information panels with table presentation built with Next.js
  • Feature comparison tables - Product specifications with plus/minus controls using TypeScript
  • Settings configuration - Tabular options with animated indicators for React applications
  • FAQ databases - Question lists with seamless table organization using Tailwind CSS

API Reference

Accordion16

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

Accordion16Item

PropTypeDefaultDescription
valuestringrequiredUnique identifier for this accordion item

Accordion16Trigger

PropTypeDefaultDescription
childrenReactNoderequiredContent to display in the trigger button

Accordion16Content

PropTypeDefaultDescription
childrenReactNoderequiredContent to display when expanded

Implementation Notes

  • Combines table-style design with complex plus/minus animation using Radix UI primitives
  • Uses -space-y-px for negative spacing creating seamless table-like row connections
  • Advanced CSS selectors for multi-layer animation effects on plus icon rotation and path opacity
  • Focus states managed with has-focus-visible:z-10 ensuring proper layering in table layout
  • Custom trigger implementation with Radix Primitive components for enhanced control
  • Compatible with shadcn/ui design system and Tailwind CSS utility classes