fun-accordion
Accordions can be used to make content take up less space, since they can be expanded and collapsed.
They can be used in groups or individually. When grouped together, they will add margins between them, if expanded.
The accordion can be tabbed to and toggled using the space bar.
The isOpen
state has to be set from the outside. Listen to the funClick
event to toggle between open and closed state.
Examples
Specifications
Properties
Property | Attribute | Required | Description | Type | Default |
---|---|---|---|---|---|
color | color | false | Set to white when displayed on a grey background. | "neutral" | "white" | 'neutral' |
isOpen | is-open | false | Controls whether the accordion should be opened or not. | boolean | false |
Events
Name | Description |
---|---|
funClick | Emitted when the accordion title is clicked (or when using space bar). |
Slots
Name | Description |
---|---|
body | What to display inside the collapsable accordion. |
title | What to display in the clickable title. |
Dependencies
Depends on
This documentation page generated from the source at fun-accordion.tsx