Build Components

Bellows

Accordion. Sections that open one at a time, or all at once, with the content in the page from the start.

Component
Accordion
Pattern
APG Accordion
Outputs
React + Tailwind, HTML/CSS/JS
Status
In stock, tested

Test bench

Runs the exported code, not a mock-up.

Output

Bellows · React + TailwindFull width

Keyboard map
KeysWhat happens
TaborShift + TabMove between section buttons, and into an open section.
EnterorSpaceOpen or close the focused section.

Take it home

React + Tailwind CSS v4: install with one command, or copy the file. Your options are already in it.

npx shadcn@latest add "/r/accordion.json"

Run it in your project root. It writes components/accordion.tsx with the options you set here. Needs Tailwind CSS v4 and a project set up for the shadcn CLI (npx shadcn@latest init).