Badge / 徽章
显示一个需要注意的指标。
基础的
展示一个数字或一段文字。
类型
以不同的色彩表达不同的状态。
Custom color
了解更多颜色,请参考 色彩章节。
锚点
将徽章固定在指定位置。
APIs / 接口文档
Badge.Props
属性 | 描述 | 类型 | 推荐值 | 默认 |
---|---|---|---|---|
type | 徽章的类型 | BadgeTypes | BadgeTypes | default |
dot | 忽略内容并显示圆点 | boolean | - | false |
... | 原生属性 | HTMLAttributes | 'alt', 'id', 'className', ... | - |
Badge.Anchor.Props
属性 | 描述 | 类型 | 推荐值 | 默认 |
---|---|---|---|---|
placement | 固定徽章的位置 | AnchorPlacement | AnchorPlacement | topRight |
... | 原生属性 | HTMLAttributes | 'alt', 'id', 'className', ... | - |
BadgeTypes
type BadgeTypes = 'default' | 'secondary' | 'success' | 'warning' | 'error'
AnchorPlacement
type AnchorPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
文档贡献者