Accordion
A vertically stacked set of interactive headings that each reveal a section of content. Requires Alpine.js.
Usage
Yes. It uses ARIA attributes and keyboard-friendly controls.
Yes. It comes with default styles that match the rest of Slate.
Yes. Open and close transitions are included.
Multiple
Allow more than one item open at once.
Yes, with
type="multiple".
For multiple, each item toggles independently.
Composition
code
Accordion
├── AccordionItem
│ ├── AccordionTrigger
│ └── AccordionContent
API Reference
Accordion
| Prop | Type | Default | Description |
|---|---|---|---|
type |
single | multiple |
single |
One open item, or many |
default-value |
string |
— | Initial open value(s); comma-separated for multiple |
collapsible |
bool |
true |
Allow closing the open item when type="single" |