Accordion

The Accordion component provides a reusable pattern for accordion in the interface.

Accordion

The accordion can be used to display larger lists of content on one page. This is wrapped in a paper component, to get a better look and feel.

Using a slot

The accordion will see if you're using the slot. In this example we're using the sub component accordion item to fill the accordion with items

A accordion with spaced items

This accordion style adds spacing between the items..

API

Parameter Default Description
ID for the accordion
[] List of accordion section
Insert before heading
Insert after heading

Insert before content

Insert after content
div Component element
div Section element
button Section heading component
div Section content component
false Sections are spaced instead of glued together
[] Array of taxonomies such as tags
Taxonomy position like top or below

CSS API

Variable Default Type Values Description
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--border-width) range - Size
var(--border-radius) range - Border Radius
var(--color--surface) color - Surface
var(--color--surface-border) color - Manual companion token for borders on surface elements.
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--color--surface-alt) color - Manual companion token for subtle surface backgrounds.
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--shadow-color) rgba - Shadow Color
var(--shadow-amount) range - Multiplier for elevation shadows. 0 = none, 1 = default.
var(--font-size-200) range - One step above base in the type scale. Equivalent to h6/subtitle.