AccordionItem API

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

Props

PropsTypeDescriptionDefault
childrenReact.ReactNodeThe content of the accordion item._
id?stringThe unique id of the accordion item. This id should be used to set the open/closed state of each accordion item._
isDefaultOpen?booleanUsed to set the default open state of the item when used as uncontrolled component.false
isOpen?booleanUsed to set the open state of the item when used as controlled component._
onToggle?({ isOpen, id } : { isOpen: boolean, id: string }) => voidCallback 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._