React Storefront
|

ExpandableSection

import ExpandableSection from 'react-storefront/ExpandableSection'

Props

NameTypeDefaultDescription
titleunion : string |
element

The title for the header of the expandable section

captionunion : string |
element

Text to display to the right of the heading

ExpandIconfunc

The icon to use for collapsed groups

CollapseIconfunc

The icon to use for expanded groups

marginsbooltrue

Set to false to remove the default left and right margins. Defaults to true.

expandedbool

Controls the expanded state. Defaults to false

defaultExpandedbool

Defaults the panel to being expanded, without controlling the state. Defaults to false

sectionIdstring

Section ID used by Accordion, defaults to title prop