Skip to content

Accordion group - Web Component

The AccordionGroup component can be used imported from:

Playground

Parameters

Events

This component has events. Check the documentation about how to use the events.

NamePayloadDescription
changenumberFires when the accordion item is changed

Slots

This component has slots. Check the documentation about how to use the slots.

NameTagsDescription
defaultspanThe content of the accordion group

Parameters use

accordions

We can pass the information of the accordions via the accordions attribute:

Or simply slotting the Accordion components:

Content 1Content 2Content 3

model

You can set the model for the current accordion inside the Accordion Group component.

Attention!

If you hardcode this value, it will not be reactive and the selection won't change. Use a variable instead and, ideally, a closed loop.

config

The config attribute it's used to define the size of the accordion group. You can set it as l to make it larger.

Browser support

Detected engine:  

  • Chromium

  • Webkit

  • Gecko

HTML Examples

CodeSandbox example