Join our Discord community
Accordion

Table Left Plus Accordion

Collapsible content panels with table-style borders and left-aligned plus/minus indicators. Perfect for React applications requiring tabular navigation with animated controls and Next.js integration and TypeScript support.

Powered by

Loading component...

Installation

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

Features

  • Table-style left plus/minus design combining connected borders with navigation-style animated indicators
  • Complex animation sequences including rotation, opacity transitions, and path transformations on left-positioned plus icon
  • Negative spacing layout with -space-y-px creating seamless table-like row connections
  • Content indentation alignment with proper spacing using padding-start utilities
  • Navigation aesthetics optimized for sidebar-like interfaces with plus/minus controls in table format
  • shadcn/ui integration using consistent design tokens and Tailwind CSS styling

Use Cases

This free open source React component works well for:

  • Interactive navigation tables - Menu structures with engaging plus/minus animations built with Next.js
  • Data hierarchies - Organized information with left-aligned controls in table format using TypeScript
  • Settings panels - Configuration sections with navigation appearance in tabular layout for React applications
  • Menu structures - Category-based navigation with animated indicators in table organization using Tailwind CSS

API Reference

Accordion18

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

Accordion18Item

PropTypeDefaultDescription
valuestringrequiredUnique identifier for this accordion item

Accordion18Trigger

PropTypeDefaultDescription
childrenReactNoderequiredContent to display in the trigger button

Accordion18Content

PropTypeDefaultDescription
childrenReactNoderequiredContent to display when expanded

Implementation Notes

  • Combines table-style design with left-aligned plus/minus using [&>svg]:-order-1 positioning
  • Uses advanced CSS selectors for multi-layer animation effects on plus icon paths with left placement
  • Content indentation with ps-7 ensures proper alignment with left-positioned icon in table layout
  • 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 in table presentation
  • Compatible with shadcn/ui design system and Tailwind CSS utility classes