Skip to content

Collapse

Use Collapse to store contents.

Basic usage

You can expand multiple panels

Accordion

In accordion mode, only one panel can be expanded at once. Activate accordion mode using the accordion attribute.

Custom title

Besides using the title attribute, you can customize panel title with named slots, which makes adding custom content, e.g. icons, possible.。

Effects

Card provide three different themes: up、down and line. Using effect to change, default is line.

Extra slot

The extra node on the far right can be set by extra. extra click to set stop modifier to prevent the current item from expanding.

Sizes

Besides default size, tu-collapse component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

Collapse API

Collapse Attributes

NameDescriptionTypeDefault
model-value / v-modelCurrently active panelString Array-
accordionWhether to activate accordion modeBooleanfalse
effectEffect of CollapseStringoutset
sizeSize of CollapseStringmedium

Collapse Events

NameDescriptionType
changeTriggers when active panels changeFunction

Collapse Slots

NameDescription
defaultCollapse Item

Collapse-Item API

Collapse-Item Attributes

NameDescriptionTypeDefault
nameUnique identification of the panelString Number-
titleTitle of the panelString-
extraExtra ContentString-
disabledWhether to disableBooleanfalse

Collapse-Item Slots

NameDescription
defaultContent of Collapse Item
titleContent of Collapse Item title
extraContent of Collapse extra content