---
title: Tabs 选项卡
description: 用于内容分类后的展示切换。
spline: navigation
isComponent: true
---
## 引入
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
```json
"usingComponents": {
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel"
}
```
## 代码演示
在开发者工具中预览效果
### 基础选项卡 {{ base }} ### 等距选项卡 {{ scroll }} ### 带图标选项卡 {{ with-icon }} ### 带徽章选项卡 {{ with-badge }} ### 带内容区选项卡 {{ with-content }} ### 选项卡状态 {{ status }} ### 选项卡尺寸 {{ size }} ### 选项卡样式 使用 theme 属性可以变换风格,支持 line = 线条(默认);tag = 标签;card = 卡片 {{ theme }}Tips: 请确保开发者工具为打开状态。导入开发者工具后,依次执行:npm i > 构建npm包 > 勾选 "将JS编译成ES5"