跳转到内容
搜索文档

徽章

最后更新 查看 MarkdownAgent 设置

The Badge component is used 80 times on 30 pages.

See all examples of pages that use Badge

Used 80 times.

Pages

Partials

徽章是 Nimbus 提供的内置组件。例如,使用它们来表示产品处于 Beta 阶段。

组件

import { Badge } from "~/components";

<Badge text="Note" variant="note" />
<Badge text="Success" variant="success" />
<Badge text="Tip" variant="tip" />
<Badge text="Caution" variant="caution" />
<Badge text="Danger" variant="danger" />
<Badge text="Default" />

侧边栏

可以通过页面 frontmatter 将徽章添加到侧边栏。

---
title: Hello World
sidebar:
  badge:
    variant: tip
    text: New
---

如果您想向产品添加 Beta 徽章,请省略 variant: 条目:

---
title: Hello World
sidebar:
  badge:
    text: Beta
---

这篇文档对您有帮助吗?