Skip to content

Tabs 标签页

Layout · Interactive component

Content tab switching.

On-demand importwbbb-ui/components/tabs

Basic Usage

Example code
<script setup lang="ts">
import { ref } from 'vue'
import { WbbbTabs } from 'wbbb-ui/components/tabs'
import 'wbbb-ui/styles/tabs'

const value = ref('')
</script>

<template>
  <WbbbTabs v-model="value" />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultPressed选中Disabled

API Reference

Props

PropertyDescriptionTypeDefaultRequired
activeColorSets the color used by the active state.string''No
itemsProvides the data items rendered by the component.WbbbTabItem[]() => []No
modelValueProvides the current value used by v-model.string \| number''No
scrollableAllows tab items to scroll horizontally when needed.booleanfalseNo

Events

  • update:modelValue
  • change

Slots

  • default

Two-way binding

Supports v-model (modelValue).

Platform Notes

Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.

Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.

Usage note: Use Playground to verify further state combinations and cross-platform behavior.

Wbbb UI · Built for uni-app product experiences