For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/badge.md.
v0.0.57
  • 简体中文
  • Badge

    数据展示@rockshin/tao-ui

    展示计数、紧凑状态标记与缎带。

    组件采用 tao-ui 原生实现,公共 API 对齐 Ant Design 6.7.0。外观、主题 token 与 Semantic DOM 定制遵循 tao-ui,主题通过 TaoProvider 配置。

    Badge 遵循 6.7.0 计数与状态 API;颜色和 Ribbon 使用 tao-ui token,计数变化直接更新。

    何时使用

    把计数关联到对应控件,状态信息同时提供文字。

    代码演示

    计数、零与溢出

    A5B0C99+D120
    TSX

    改变计数

    5
    TSX

    圆点与小尺寸

    8
    TSX

    状态标签

    SyncedProcessingNeeds reviewFailedIdle
    TSX

    自定义颜色与偏移

    ALNewCustom status
    TSX

    缎带位置

    Team plan
    Shared workspace and collaboration.
    Featured
    New workflow
    Try the updated workflow.
    Preview
    TSX

    API

    Badge

    属性说明类型默认值