On This Page
An component that allows you to organize your content into sections that can be expanded or collapsed.
You can update the styles for the title button with the titleStyle
prop.
You can allow multiple accordion items to be open at the same time, using the the multiple
prop and setting it to true
.
<Accordion multiple={true} >
<!-- Items... -->
</Accordion>
You can set the item that should be open by default by passing in the item’s key to the defaultOpen
prop.
<Accordion defaultOpen="water" >
<AccordionItem key="water">
<!-- Title & Content -->
</AccordionItem>
<!-- More items... -->
</Accordion>
You can disable the accordion and adjust the disabled styles with the disabled
and disabledStyle
props respectively.
<Accordion disabled={true} >
<!-- Items... -->
</Accordion>