Skip to content

Text 文本

Basic · Display component

Semantic text and ellipsis handling.

On-demand importwbbb-ui/components/text

Basic Usage

Example code
<script setup lang="ts">
import { WbbbText } from 'wbbb-ui/components/text'
import 'wbbb-ui/styles/text'
</script>

<template>
  <WbbbText />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

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

DefaultPrimarySuccessWarningDangerInfo

API Reference

Props

PropertyDescriptionTypeDefaultRequired
colorSets the primary display color.string''No
ellipsisTruncates overflowing text with an ellipsis.booleanfalseNo
sizeSets the component size.WbbbNumeric''No
typeSets the semantic type or variant of the component.'default' \| 'secondary' \| 'primary' \| 'success' \| 'warning' \| 'danger''default'No

Events

None

Slots

  • default

Two-way binding

Does not support v-model.

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