AccordionSummary

The header of an Accordion: a button in a heading that opens and closes it.

The header of an Accordion: a button in a heading that opens and closes it. It carries aria-expanded and aria-controls for the region, and an icon that turns as it opens. It must sit in an Accordion.

<AccordionSummary headingLevel={2}>Shipping</AccordionSummary>

Demos

For usage examples, visit the component demo page: Accordion

Import

import { AccordionSummary } from '@soroush.tech/design-system/Accordion'

Props

PropTypeDefaultDescription
childrenReactNode-What the header says.
expandIconReactNodethe expand_more iconThe icon that turns as it opens.
headingLevel`123
className, data-testidOn the heading.

Customization

theme.components.AccordionSummary styles the root (the heading), the button, its content and the icon. Its defaultProps set headingLevel.

Source code

If this page does not answer your question, have a look at the implementation of the component for more detail.