Skip to content
nexubDesign System
v2.4.0

Components · Disclosure

Accordion

StableSince v0.0.1

Vertically stacked list of collapsible sections.

import { Accordion } from '@nexub/react';

Examples

Default

Multiple

Props

Props
PropTypeDefaultDescription
Accordion.Root type'single' | 'multiple''single'Whether one or multiple items can be open at the same time.
Accordion.Root collapsiblebooleanfalseWhen type is "single", allows the open item to be collapsed by clicking it again.
Accordion.Root defaultValuestring | string[]—The item(s) open by default (uncontrolled).
Accordion.Root valuestring | string[]—Controlled open item(s).
Accordion.Root onValueChange(value: string | string[]) => void—Callback fired when the open state changes.
Accordion.Root disabledbooleanfalseDisables all items in the accordion.
Accordion.Item valuerequiredstring—Unique identifier for the item.
Accordion.Item disabledbooleanfalseDisables this specific item.
Accordion.Trigger asChildbooleanfalseMerges props onto the immediate child element.
Accordion.Content forceMountbooleanfalseKeeps content in the DOM even when collapsed.