Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Accordion

Application-controlled disclosure of related content.

Preview

Live preview

Changes apply to this preview only.

tokens
Colours, spacing, radius and type are generated from one token pipeline.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Single

One item at a time; collapsible lets the open item close again.

Open preview

Multiple

Any number of sections can stay open.

Open preview

Variants

Enumerated from accordionVariantMap: default, separated and ghost.

Open preview

Usage

Choose single or multiple expansion according to whether users compare panels.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluAccordionProps

Type source
PimoluAccordionProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
variant"ghost" | "default" | "separated" | undefined"default"Visual treatment. Defaults to "default".
collapsibleboolean | undefinedfalseIn single mode, allow closing the open item. Defaults to false.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
type"single" | "multiple" | undefined—Public Pimolu prop; see the source declaration for details.
valuestring | string[] | undefined—Public Pimolu prop; see the source declaration for details.
defaultValuestring | string[] | undefined—Public Pimolu prop; see the source declaration for details.
onValueChange((value: string | undefined) => void) | ((value: string[]) => void) | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

variant

"ghost" | "default" | "separated" | undefined

Default: "default"

Visual treatment. Defaults to "default".

collapsible

boolean | undefined

Default: false

In single mode, allow closing the open item. Defaults to false.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

type

"single" | "multiple" | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

value

string | string[] | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

defaultValue

string | string[] | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

onValueChange

((value: string | undefined) => void) | ((value: string[]) => void) | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluAccordionItemProps

Type source
PimoluAccordionItemProps public API
NameTypeDefaultDescription
valueRequiredstring—Value shared with the trigger and content.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
valueRequired

string

No default extracted.

Value shared with the trigger and content.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluAccordionTriggerProps

Type source
PimoluAccordionTriggerProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

PimoluAccordionContentProps

Type source
PimoluAccordionContentProps public API
NameTypeDefaultDescription
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Keep heading order meaningful and verify Enter/Space activation on the triggers.
Read the accessibility guide →