BetaPublic beta — Read the release notes
Documentation

Accordion

Vertically stacked set of collapsible sections.

Package
@solidiom/accordion
Version
0.0.1-next.0
Status
stable

Generated from the package's public source.

API

AccordionContentPropsinterface

Props for the accordion item content region.

Props

class?
string
style?
string | CSSProperties

children: Element

View source

AccordionItemPropsinterface

Props for an individual accordion item.

Props

disabled?
boolean — Whether this item is disabled.
value
string — Unique value identifying this item.

children: Element

View source

AccordionReasontype

Reason for an accordion value change.

View source

AccordionRootPropsinterface

Props for the accordion root container.

Props

collapsible?
boolean — Whether all items can be collapsed in single mode. Default: false.
defaultValue?
string[] — Default expanded value(s) for uncontrolled mode.
disabled?
Accessor<boolean> — Disabled state for all items.
onValueChange?
(value: string[], details: ChangeDetails<AccordionReason>) => void — Called when expanded items change.
type?
"single" | "multiple" — Expand mode: "single" allows one open item, "multiple" allows many.
value?
Accessor<string[]> — Controlled expanded value(s).

children: Element

View source

AccordionTriggerPropsinterface

Props for the accordion item trigger button.

Props

ref?
(el: HTMLButtonElement) => void

children: Element

View source

Contentcomponent

@solidiom/accordion — Headless accordion primitive with single/multiple expand modes. Parts: Root, Item, Trigger, Content.

                        Content(props: AccordionContentProps): Element
                      

Props

class?
string
style?
string | CSSProperties

children: Element

View source

Itemcomponent

@solidiom/accordion — Headless accordion primitive with single/multiple expand modes. Parts: Root, Item, Trigger, Content.

                        Item(props: AccordionItemProps): Element
                      

Props

disabled?
boolean — Whether this item is disabled.
value
string — Unique value identifying this item.

children: Element

View source

Rootcomponent

@solidiom/accordion — Headless accordion primitive with single/multiple expand modes. Parts: Root, Item, Trigger, Content.

                        Root(props: AccordionRootProps): Element
                      

Props

collapsible?
boolean — Whether all items can be collapsed in single mode. Default: false.
defaultValue?
string[] — Default expanded value(s) for uncontrolled mode.
disabled?
Accessor<boolean> — Disabled state for all items.
onValueChange?
(value: string[], details: ChangeDetails<AccordionReason>) => void — Called when expanded items change.
type?
"single" | "multiple" — Expand mode: "single" allows one open item, "multiple" allows many.
value?
Accessor<string[]> — Controlled expanded value(s).

children: Element

View source

Triggercomponent

@solidiom/accordion — Headless accordion primitive with single/multiple expand modes. Parts: Root, Item, Trigger, Content.

                        Trigger(props: AccordionTriggerProps): Element
                      

Props

ref?
(el: HTMLButtonElement) => void

children: Element

View source