# tabs
- [权限列表](#zh-cn_topic_0000001173324585_section11257113618419)
- [子组件](#zh-cn_topic_0000001173324585_section9288143101012)
- [属性](#zh-cn_topic_0000001173324585_section2907183951110)
- [样式](#zh-cn_topic_0000001173324585_section169548171376)
- [事件](#zh-cn_topic_0000001173324585_section3892191911214)
- [示例](#zh-cn_topic_0000001173324585_section14993155318710)
tab页签容器。
## 权限列表
无
## 子组件
仅支持最多一个<[tab-bar](js-components-container-tab-bar.md#ZH-CN_TOPIC_0000001164130760)\>和最多一个<[tab-content](js-components-container-tab-content.md#ZH-CN_TOPIC_0000001164290710)\>。
## 属性
除支持[通用属性](js-components-common-attributes.md#ZH-CN_TOPIC_0000001163812208)外,还支持如下属性:
名称
|
类型
|
默认值
|
必填
|
描述
|
index
|
number
|
0
|
否
|
当前处于激活态的tab索引。
|
vertical
|
boolean
|
false
|
否
|
是否为纵向的tab,默认为false,可选值为:
- false:tabbar和tabcontent上下排列。
- true:tabbar和tabcontent左右排列。
|
## 样式
支持[通用样式](js-components-common-styles.md#ZH-CN_TOPIC_0000001163932190)。
## 事件
除支持[通用事件](js-components-common-events.md#ZH-CN_TOPIC_0000001209412119)外,还支持如下事件:
名称
|
参数
|
描述
|
change
|
{ index: indexValue }
|
tab页签切换后触发。
|
## 示例
```
Home
Index
Detail
First screen
Second screen
Third screen
```
```
/* xxx.css */
.container {
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.tabs {
width: 100%;
}
.tabcontent {
width: 100%;
height: 80%;
justify-content: center;
}
.item-content {
height: 100%;
justify-content: center;
}
.item-title {
font-size: 60px;
}
.tab-bar {
margin: 10px;
height: 60px;
border-color: #007dff;
border-width: 1px;
}
.tab-text {
width: 300px;
text-align: center;
}
```
```
// xxx.js
export default {
change: function(e) {
console.log("Tab index: " + e.index);
},
}
```
