AccordionItem API

API reference docs for theAccordionItemcomponent. For examples and details on the usage of this component, visit the component demo page.

Props

Props

Type

Description

Default

children

React.ReactNode

The content of the accordion item.

_

id?

string

The unique id of the accordion item. This id should be used to set the open/closed state of each accordion item.

_

isDefaultOpen?

boolean

Used to set the default open state of the item when used as uncontrolled component.

false

isOpen?

boolean

Used to set the open state of the item when used as controlled component.

_

onToggle?

({ isOpen, id } : { isOpen: boolean, id: string }) => void

Callback function that is called when the item is toggled. isOpen is a boolean that indicates the open state of the item. id is the unique id of the item.

_