Collapse

Usage

A collapse is a content area commonly used to organize related information that can be collapsed and expanded. It can be triggered by just a heading or a more complex content snippet.

Best practices

Do

Use it to make pages shorter, and reduce scroll if the content is not crucial for the interaction.

Don't

Do not nest them. Having several components that hide information nested can resolve into a very tedious experience.

Do

Use it when the users need to see more than one section at a time

Don't

Do not use them if the user needs to switch quickly between sections as the other sections might be pushed down. Use tabs instead.

Examples

Live Preview

Props

NameDescription Type Default Values
divider
Shows a divider at the bottom of the collapse component.booleanfalsefalse, true
indent
Indents the collapse content.booleanfalsefalse, true
model-value
Controls whether the collapse is open or not.booleanfalsefalse, true
padding
Controls the padding of the collapse component.stringmediumnone, small, medium

Slots

NameDescription
header
The header slot can contain a heading or a more complex content snippet.
panel
The panel that holds the collapsed content.

Events

NameDescription Type
update:modelValue
Emitted when the collapse is toggled.{ "names": [ "Boolean" ] }