Accordion
Sections that open one at a time or several at once, as flat rows or as a card whose open item breaks away.
npx shadcn add https://kinoui.com/r/accordion.jsonCopy install command
Examples
Default
One section is open at a time. A panel pushes what sits below it, and turns back from where it is when you close it midway.
Card
The items share one card. The open item breaks away from the others, and its plus becomes a minus.
Several open at once
With multiple, opening a section leaves the others as they are.
Icons and counts
An icon sits before the title. When something follows the title, wrap the title so it takes the room between them.
Disabled
A disabled item fades and stays closed.
Content that changes height
Content that grows or shrinks while its panel is open takes the panel, and the rows below, with it.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/accordion.json- Files
lib/reduce-motion.tslib/resize.tslib/scroll.tscomponents/kino/accordion.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Accordion
AccordionItem
AccordionContent
Data attributes
CSS variables
Accessibility
- Tab moves from one header to the next, and Enter or Space opens or closes the focused one.
- Each header is an
h3. - With one item open at a time, opening an item closes the one above it, which could carry the header you pressed out of view. The accordion holds that header at the top edge while the page scrolls under it. Under a sticky header, set
scroll-padding-topon the scroller, orscroll-margin-topon the triggers, to the header's height. - When the system asks for less motion, a panel opens and closes at once, the indicator and the card jump to their place, and content still fades.