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

PropertyAttributeRequiredDescriptionTypeDefault
colorcolorfalseSet to white when displayed on a grey background."neutral" | "white"'neutral'
isOpenis-openfalseControls whether the accordion should be opened or not.booleanfalse

Events

NameDescription
funClickEmitted when the accordion title is clicked (or when using space bar).

Slots

NameDescription
bodyWhat to display inside the collapsable accordion.
titleWhat to display in the clickable title.

Dependencies

Depends on

This documentation page generated from the source at fun-accordion.tsx

Search Gunnel

Powered byAlgolia