Skip to main content

Type Alias: AccordionProps

AccordionProps = BoxProps & object

Defined in: Accordion/Accordion.tsx:62

Props for the Accordion component.

Type Declaration​

defaultExpanded?​

optional defaultExpanded?: number | number[]

Index or array of indices for initially expanded items.

items​

items: AccordionItem[]

Array of accordion items to render.

multiple?​

optional multiple?: boolean

Whether multiple items can be expanded at once.

Default​

false

onAccordionChange?​

optional onAccordionChange?: (expandedIndices) => void

Callback invoked when items are expanded or collapsed. Receives array of currently expanded indices.

Parameters​

ParameterType
expandedIndicesnumber[]

Returns​

void

renderItem?​

optional renderItem?: (props) => React.ReactNode

Custom render function for accordion items. Provides full control over item rendering while maintaining accessibility.

Parameters​

ParameterType
propsAccordionRenderItemProps

Returns​

React.ReactNode