<Accordion> Component

Display a list of titled items with expandable content.

Share
Code Editor

Where it's used

0.x.x
Loading 0.x.x releases...
1.x.x
Loading 1.x.x releases...
2.x.x
Loading 2.x.x releases...

Props Table

đź‘‹ It's important to call out that for accordion.items.content you can pass Strings, HTML Content, React Content or Children

NameDescription
heading
String
the text for the <h2> that precedes your expandable elements
className
string
Optional className to add to the root element
items*
Array
an array of your expandable <AccordionElement> items
Array members must be of the type below:
items[x]
object
Object contains nested props, see below:
items[x].heading
string
the title and heading of the accordion element
items[x].content
string|React.Element
content within the expandable area - can be a string or jsx content

Examples

Accordion Item with HTML
Share
Code Editor