Accordion
Accordion is a vertical stack of headers that expand or collapse to show or hide content, providing an organized, user-friendly way to manage information.
Basic
An disclosure functions as a vertical stack of headers that expand to reveal or conceal content sections.
Installation
Default Expanded
Set the initially expanded sections by providing an array of keys to the defaultExpandedKeys
prop. These keys can be either numbers or strings.
Allow Multiple Expanded
Allow multiple sections to be expanded at once by using the allowsMultipleExpanded
prop.
Border Hidden
Eliminate the border between sections by using the hideBorder
prop.
Hide Indicator
Eliminate the visual indicator (arrow key) by using the hideIndicator
prop.
Hide Everything
You may want to hide the entire disclosure attribute like border or indicator. You can do that by using the hideBorder
and hideIndicator
props.
Disabled
You can disabled specific sections by using the isDisabled
props to the item.