Accordion
Vertically stacked collapsible sections with glassmorphism styling.
Accordion displays vertically stacked collapsible sections built on Radix UI. It supports single or multiple expansion modes, keyboard navigation, and glassmorphism styling that matches the rest of the design system.
Each trigger includes a built-in chevron affordance that rotates with the open state, and content uses an internal padded wrapper so text spacing stays consistent by default.
Installation
npx @glass-ui-kit/cli add accordionUsage
Examples
Multiple
Allow multiple sections to be open at the same time.
Variants
Use the variant prop on AccordionItem to match the visual hierarchy of your interface.
default
soft
strong
Disabled
Disable individual items to prevent interaction.
Controlled
Use value and onValueChange when the open item must be controlled by surrounding state.
Styling
Accordion follows a prop-first API. Reach for type on the root and variant on items first. Use className as an escape hatch for one-off layout or visual tweaks. The trigger ships with a built-in chevron and the content wrapper already applies balanced horizontal and bottom padding.
API Reference
Accordion
Accepts all Radix Accordion.Root props.
| Prop | Type |
|---|---|
type | "single" | "multiple" |
collapsible | boolean (single mode only) |
defaultValue | string | string[] |
value | string | string[] |
onValueChange | (value: string | string[]) => void |
dir | "ltr" | "rtl" |
orientation | "vertical" | "horizontal" |
className | string |
AccordionItem
| Prop | Type |
|---|---|
value | string (required) |
variant | "default" | "soft" | "strong" |
disabled | boolean |
className | string |
Other Sub-components
| Component | Props |
|---|---|
AccordionHeader | Standard h3 props |
AccordionTrigger | Standard button props |
AccordionContent | Standard div props |