Skip to main content

Expander

An accordion component for collapsible content sections. Supports single and multiple expansion modes.

Single (Accordion)

A React component library with accessible, customizable UI components.

Multiple

Content for section A.
Content for section B.

Variants

Separated variant

separated renders each item as its own card with gap between — useful when items represent independent units (settings groups, product features) rather than a connected accordion.

Disabled Item

Expander Props

PropTypeDefaultDescription
type'single' | 'multiple''single'Single (accordion) or multiple items open at once
defaultValuestring | string[]-Initially open item(s) (uncontrolled)
valuestring | string[]-Controlled open item(s)
onChange(value: string | string[]) => void-Callback when open items change
variant'default' | 'bordered' | 'separated''default'Visual variant
childrenReactNode-Children
classNamestring-Additional CSS class
styleCSSProperties-Inline styles

Expander.Item Props

PropTypeDefaultDescription
valuestring-Unique value identifying this item
disabledbooleanfalseDisabled state
classNamestring-Additional CSS class
childrenReactNode-Children (Trigger + Content)

Expander.Trigger Props

PropTypeDefaultDescription
childrenReactNode-Trigger label
classNamestring-Additional CSS class

Expander.Content Props

PropTypeDefaultDescription
childrenReactNode-Content
classNamestring-Additional CSS class