Collapse
Use Collapse to store contents.
Basic usage
You can expand multiple panels
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-collapse v-model="activeNames" @change="handleChange">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const activeNames = ref([]);
const handleChange = (val: string[]) => {
console.log(val);
};
</script>
<template>
<tu-collapse v-model="activeNames" @change="handleChange">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const activeNames = ref([]);
const handleChange = (val: string[]) => {
console.log(val);
};
</script>
Accordion
In accordion mode, only one panel can be expanded at once. Activate accordion mode using the accordion attribute.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-collapse v-model="activeName" accordion>
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const activeName = ref();
</script>
<template>
<tu-collapse v-model="activeName" accordion>
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const activeName = ref();
</script>
Custom title
Besides using the title attribute, you can customize panel title with named slots, which makes adding custom content, e.g. icons, possible.。
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-collapse>
<tu-collapse-item name="1">
<template #title>
<div style="font-weight: bold">Tu view plus</div>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<template>
<tu-collapse>
<tu-collapse-item name="1">
<template #title>
<div style="font-weight: bold">Tu view plus</div>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
Effects
Card provide three different themes: up、down and line. Using effect to change, default is line.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-radio-group
v-model="collapseEffect"
type="button"
style="margin-bottom: 20px"
>
<tu-radio label="outset">Outset</tu-radio>
<tu-radio label="inset">Inset</tu-radio>
<tu-radio label="bordered">Bordered</tu-radio>
<tu-radio label="outlined">Outlined</tu-radio>
<tu-radio label="flat">Flat</tu-radio>
</tu-radio-group>
<tu-collapse :effect="collapseEffect">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const collapseEffect = ref('outset');
</script>
<template>
<tu-radio-group
v-model="collapseEffect"
type="button"
style="margin-bottom: 20px"
>
<tu-radio label="outset">Outset</tu-radio>
<tu-radio label="inset">Inset</tu-radio>
<tu-radio label="bordered">Bordered</tu-radio>
<tu-radio label="outlined">Outlined</tu-radio>
<tu-radio label="flat">Flat</tu-radio>
</tu-radio-group>
<tu-collapse :effect="collapseEffect">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const collapseEffect = ref('outset');
</script>
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.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
confrim
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-collapse>
<tu-collapse-item title="Tu view plus" name="1">
<template #extra>
<tu-icon>
<Setting />
</tu-icon>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" extra="confrim" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
<template #extra>
<tu-button size="small" @click.stop="save">Save</tu-button>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { Setting } from '@tu-view-plus/icons-vue';
const save = () => {
console.log('save');
};
</script>
<template>
<tu-collapse>
<tu-collapse-item title="Tu view plus" name="1">
<template #extra>
<tu-icon>
<Setting />
</tu-icon>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" extra="confrim" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
<template #extra>
<tu-button size="small" @click.stop="save">Save</tu-button>
</template>
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { Setting } from '@tu-view-plus/icons-vue';
const save = () => {
console.log('save');
};
</script>
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.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
Tu view plus
Our mission has always been focused on bringing openness and transparency to the design process. We've always believed that by providing a space where designers can share ongoing work not only empowers them to make better products, it also helps them grow. We're proud to be a part of creating a more open culture and to continue building a product that supports this vision.
<template>
<tu-radio-group
v-model="collapseSize"
type="button"
style="margin-bottom: 20px"
>
<tu-radio label="mini">Mini</tu-radio>
<tu-radio label="small">Small</tu-radio>
<tu-radio label="medium">Medium</tu-radio>
<tu-radio label="large">Large</tu-radio>
</tu-radio-group>
<tu-collapse :size="collapseSize">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const collapseSize = ref('medium');
</script>
<template>
<tu-radio-group
v-model="collapseSize"
type="button"
style="margin-bottom: 20px"
>
<tu-radio label="mini">Mini</tu-radio>
<tu-radio label="small">Small</tu-radio>
<tu-radio label="medium">Medium</tu-radio>
<tu-radio label="large">Large</tu-radio>
</tu-radio-group>
<tu-collapse :size="collapseSize">
<tu-collapse-item title="Tu view plus" name="1">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="2">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
<tu-collapse-item title="Tu view plus" name="3">
Our mission has always been focused on bringing openness and transparency
to the design process. We've always believed that by providing a space
where designers can share ongoing work not only empowers them to make
better products, it also helps them grow. We're proud to be a part of
creating a more open culture and to continue building a product that
supports this vision.
</tu-collapse-item>
</tu-collapse>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const collapseSize = ref('medium');
</script>
Collapse API
Collapse Attributes
Name | Description | Type | Default |
---|---|---|---|
model-value / v-model | Currently active panel | String Array | - |
accordion | Whether to activate accordion mode | Boolean | false |
effect | Effect of Collapse | String | outset |
size | Size of Collapse | String | medium |
Collapse Events
Name | Description | Type |
---|---|---|
change | Triggers when active panels change | Function |
Collapse Slots
Name | Description |
---|---|
default | Collapse Item |
Collapse-Item API
Collapse-Item Attributes
Name | Description | Type | Default |
---|---|---|---|
name | Unique identification of the panel | String Number | - |
title | Title of the panel | String | - |
extra | Extra Content | String | - |
disabled | Whether to disable | Boolean | false |
Collapse-Item Slots
Name | Description |
---|---|
default | Content of Collapse Item |
title | Content of Collapse Item title |
extra | Content of Collapse extra content |