Collapsible
A header row that shows or hides one section, its chevron turning down as the section opens.
npx shadcn add https://kinoui.com/r/collapsible.jsonCopy install command
Examples
Default
Each section opens on its own. Its chevron turns down, and the panel pushes what sits below it.
Controlled
Hold open yourself to open sections from elsewhere, as Expand all does.
Content that changes height
Content that grows or shrinks while the panel is open takes the panel, and what sits below, with it.
Rua das Flores 28, 1200-195 Lisboa
Find in page
With hiddenUntilFound, the browser’s find in page searches the closed panel and opens it on a match. Press ⌘F or Ctrl+F and search for Lisboa.
Disabled
A disabled collapsible fades and stays as it is.
Installation
Copy code
npx shadcn@latest add https://kinoui.com/r/collapsible.json- Files
lib/reduce-motion.tslib/resize.tscomponents/kino/collapsible.tsx- Packages
@base-ui/react- 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
Collapsible
CollapsibleContent
Data attributes
Accessibility
- The trigger is a button with
aria-expanded, andaria-controlsnames the panel. Enter or Space opens or closes it. - The chevron is hidden from screen readers; the expanded state says the same.
- When the system asks for less motion, the panel opens and closes at once, the chevron jumps to its place, and content still fades.