Accordion
A content area which can be collapsed and expanded.
Examples
Use as a component
Basic example
Initial state set to expanded
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolor quos unde
suscipit quisquam tenetur, autem dolore labore sapiente explicabo omnis
iusto amet repudiandae dignissimos dolores ex tempora fugit eum maiores.
Example without a title.
Ignore the internal logic with static property
Use as a composable
Component API
Accordion
Prop | Description | Type | Default |
---|---|---|---|
component | If the value is false only children of the main component will be rendered | boolean | false |
isStatic | If true the components becomes a shell and ignores all the internal logic | boolean | false |
expanded | Whether accordion is expanded | boolean | false |
title | Title of the collapsable section | string |
|
onTitleClick | Triggers when the title is clicked | function | () => {} |
Accordion Button
Prop | Description | Type | Default |
---|---|---|---|
onClick | Triggers when the title is clicked | function | () => {} |
Accordion Content
Prop | Description | Type | Default |
---|---|---|---|
expanded | Whether the content is visible | boolean | false |