Badge
小于 1 分钟
支持自定义颜色的徽章。
你可以在 Markdown 中使用这个组件来为标题或链接添加一些状态。
示例
标题徽章 新 MrHope
徽章测试 构建中 MrHope
Demo
## 标题徽章 <Badge text="新" type="tip" /> <Badge text="MrHope" color="grey" /> {#heading-badge}
徽章测试 <Badge text="构建中" type="warning" /> <Badge text="MrHope" color="grey" />选项
text必填
string徽章的文字。
type
"tip" | "warning" | "danger" | "important" | "info" | "note"默认值
"info"徽章的类型:
- tip
- warning
- danger
- important
- info
- note
color
string徽章的颜色,填入在 CSS 中合法的颜色值。
vertical
"top" | "middle" | "baseline" | "bottom"徽章的垂直方向的位置。
更新日志
2026/9/28 12:45
查看所有更新日志
0c1aa-于1bd5f-于16ba7-于6ad69-于0f844-于43072-于9d2e9-于ab41c-于2243a-于6c51a-于