Accordion
Allows users to expand and collapse sections of content.
Installation
Install
yarn add @iag/chroma-react-ui.components
Import
import { Accordion } from '@iag/chroma-react-ui.components';
Accessibility
Accessibility Documentation(opens in new window)Default
Initial state expanded
There are two ways to do this
- Set as
initial
state in theAccordion
element - Set as a property
isInitiallyExpanded
in theAccordionItem
element
Example with icon
Properties
Name
Description
- children*ReactNodeContent to be displayed inside the component
- classNamestringAdditional CSS classes to be applied
- id*stringHTML id attribute for the component
- initialstring[]An array of ids that indicate which items should be open on render
- showExpandButtonbooleandisplays a button that will expand all/collapse all accordion items