Primitives
Accordion
Sections that open in place: a category and its entries, a question and its answer. Each header is a heading with a button in it, and up and down move between headers. A trailing value, such as an Amount, is part of the header's name; actions sit beside the button, outside it, so a click on them does not toggle the section. The panel opens to its height in CSS.
Preview
- rent2026-09-26−$1,800.00
- groceries2026-09-25−$123.80
Installation
// Resolves dependencies, copies the source, and installs npm packages automatically.
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | - | One open at a time, or several. collapsible lets the open one close |
| value, defaultValue, onValueChange | string | string[] | - | Controlled or not |
| trailing | ReactNode | - | On AccordionTrigger: a value on the right |
| actions | ReactNode | - | On AccordionTrigger: buttons beside it |
| headingLevel | 2 | 3 | 4 | 3 | On AccordionTrigger: the header's level in the page |