Skip to content

Accordion

Accordion allows users to expand and collapse sections of content, revealing or hiding information as needed.

Accordion

Divide content into collapsible sections.

Import

js
import { MpAccordion, MpAccordionHeader, MpAccordionIcon, MpAccordionItem, MpAccordionPanel } from '@mekari/pixel3'

Playground

API

MpAccordion

Props
Events
Slots
NameTypeDefault
default-index-open
Default index for opened accordion.
number -
is-allow-multiple
If true, multiple accordion items can be expanded at once.
booleanfalse
is-allow-toggle
If true, any expanded accordion item can be collapsed again.
booleanfalse
is-controlled
If true, accordion will be controll manually.
booleanfalse

MpAccordionItem

Props
Slots
NameTypeDefault
id
Id of accordion item.
string -
is-open
If true, accordion item will be open.
booleanfalse
is-default-open
If true, accordion item will be initially opened.
booleanfalse
is-disabled
If true, accordion item will be disabled.
booleanfalse

MpAccordionHeader

Props
Slots
NameTypeDefault
is-clickable
If true, accordion header is clickable
booleantrue

MpAccordionIcon

Props
NameTypeDefault
name
Name of accordion icon.
IconNamecaret-down

MpAccordionPanel

Slots
NameType
default
Accordion panel slot
any

Usage

Icon position

Multiple expand

Controlled