Accordion
A vertically stacked set of collapsible sections. Animations are powered by
tw-animate-css — animate-accordion-down on open and animate-accordion-up
on close — so the height transition is buttery smooth.
accordion-demo.app
A modern Y2K / kawaii-retro component library for React. Flat windows, thick navy outlines, pastel fills. No glassmorphism, no Win98 bevel.
Installation
terminal.sh
npx y2kui@latest add accordionUsage
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "@/components/ui/accordion";Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'single' | 'multiple' | — | Whether one or multiple items can be open at a time. |
collapsible | boolean | — | Allow items to be collapsed when type='single'. |
defaultValue | string | string[] | — | Initial open item(s) (uncontrolled). |
value | string | string[] | — | Controlled open item(s). |
onValueChange | (value: string | string[]) => void | — | Fired when the open items change. |