Basic
A single accordion keeps one settings section visible at a time.
Accordion component for Vellira applications.
Import the component and configure it with the same props used in the playground.
Common patterns and practical usage examples.
A single accordion keeps one settings section visible at a time.
Use multiple mode when people need to compare information across sections.
Allow the current section to close when the interface can return to an empty state.
Store the open section in application state when another part of the interface needs to control it.
Set an initial expanded item while keeping later changes uncontrolled.
Disable the whole accordion or a single item while preserving visible context.
Panels can contain structured content for support notes or account summaries.
Props available for the React Accordion.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Compound Accordion.Item, Accordion.Trigger, and Accordion.Content nodes. |
type | 'single' | 'single' | Determines whether one item or multiple items can be expanded. |
value | string | - | Controlled expanded value or values. |
defaultValue | string | - | Initial expanded value or values for uncontrolled usage. |
onValueChange | ( | - | Called with the next expanded value or values after interaction. |
collapsible | boolean | false | Allows an expanded single item to collapse back to no selection. |
disabled | boolean | false | Disables interaction for the root, item, or trigger. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Compound Accordion.Item, Accordion.Trigger, and Accordion.Content nodes. |
valueRequired | string | - | Controlled expanded value or values. |
disabled | boolean | false | Disables interaction for the root, item, or trigger. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Compound Accordion.Item, Accordion.Trigger, and Accordion.Content nodes. |
disabled | boolean | false | Disables interaction for the root, item, or trigger. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Compound Accordion.Item, Accordion.Trigger, and Accordion.Content nodes. |
forceMount | boolean | - | Keeps content mounted even when the item is collapsed. |
Guidance for accessible usage and interaction.
disabled