Consistent with real life: in line with the process and logic of real
life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as:
design style, icons and texts, position of elements, etc.
Operation feedback: enable the users to clearly perceive their operations
by style updates and interactive effects;
Visual feedback: reflect current state by updating or rearranging elements
of the page.
Simplify the process: keep operating process simple and intuitive;
Definite and clear: enunciate your intentions clearly so that the users
can quickly understand and make decisions;
Easy to identify: the interface should be straightforward, which helps the
users to identify and frees them from memorizing and recalling.
Decision making: giving advices about operations is acceptable, but do not
make decisions for the users;
Controlled consequences: users should be granted the freedom to operate,
including canceling, aborting or terminating current operation.
```
:::
### Accordion
In accordion mode, only one panel can be expanded at once
:::demo Activate accordion mode using the `accordion` attribute.
```html
Consistent with real life: in line with the process and logic of real
life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as:
design style, icons and texts, position of elements, etc.
Operation feedback: enable the users to clearly perceive their operations
by style updates and interactive effects;
Visual feedback: reflect current state by updating or rearranging elements
of the page.
Simplify the process: keep operating process simple and intuitive;
Definite and clear: enunciate your intentions clearly so that the users
can quickly understand and make decisions;
Easy to identify: the interface should be straightforward, which helps the
users to identify and frees them from memorizing and recalling.
Decision making: giving advices about operations is acceptable, but do not
make decisions for the users;
Controlled consequences: users should be granted the freedom to operate,
including canceling, aborting or terminating current operation.
```
:::
### Custom title
Besides using the `title` attribute, you can customize panel title with named slots, which makes adding custom content, e.g. icons, possible.
:::demo
```html
Consistency
Consistent with real life: in line with the process and logic of real
life, and comply with languages and habits that the users are used to;
Consistent within interface: all elements should be consistent, such as:
design style, icons and texts, position of elements, etc.
Operation feedback: enable the users to clearly perceive their operations
by style updates and interactive effects;
Visual feedback: reflect current state by updating or rearranging elements
of the page.
Simplify the process: keep operating process simple and intuitive;
Definite and clear: enunciate your intentions clearly so that the users
can quickly understand and make decisions;
Easy to identify: the interface should be straightforward, which helps the
users to identify and frees them from memorizing and recalling.
Decision making: giving advices about operations is acceptable, but do not
make decisions for the users;
Controlled consequences: users should be granted the freedom to operate,
including canceling, aborting or terminating current operation.
```
:::
### Collapse Attributes
| Attribute | Description | Type | Accepted Values | Default |
| --------------------- | ---------------------------------- | ---------------------------------------------------- | --------------- | ------- |
| model-value / v-model | currently active panel | string (accordion mode) / array (non-accordion mode) | — | — |
| accordion | whether to activate accordion mode | boolean | — | false |
### Collapse Events
| Event Name | Description | Parameters |
| ---------- | ---------------------------------- | ------------------------------------------------------------------- |
| change | triggers when active panels change | (activeNames: array (non-accordion mode) / string (accordion mode)) |
### Collapse Item Attributes
| Attribute | Description | Type | Accepted Values | Default |
| --------- | ---------------------------------- | ------------- | --------------- | ------- |
| name | unique identification of the panel | string/number | — | — |
| title | title of the panel | string | — | — |
| disabled | disable the collapse item | boolean | — | — |
### Collapse Item Slot
| Name | Description |
| ----- | ------------------------------ |
| — | content of Collapse Item |
| title | content of Collapse Item title |