Skip to content

Accordion

Stacked disclosure sections on Base UI Accordion.

One at a time

Every second Tuesday at 10:00. A release that misses the cut waits for the next one.

Several open

Invoices are issued on the first of the month and are due in 30 days.

Twelve seats are in use. Three more are included in the plan.

Disabled item

Installation

npx shadcn@latest add @khaeli/accordion

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items
npm packages
  • @base-ui/react ^1.7.0
  • @keyline-icons/react ^2.2.0

Keyboard

TabShift + Tab
Moves between the triggers, in order. The trigger of a disabled item is a native disabled button and is skipped.
EnterSpace
Opens or closes the focused section. Without multiple, opening a section closes the one that was open.

Accessible name

  • Each trigger is a button inside a heading and is named by its text, so write the text as the section's title. It exposes aria-expanded.
  • An open panel is a region named by its trigger. Nothing else needs a name.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/accordion.json