This is a demo announcement, dismissible and configured in site.json.

Badge

Inline pill labels for annotating features, status and version information.

The badge shortcode renders a small inline pill label. Use it in prose, headings and table cells to annotate feature status, API stability, version requirements and similar metadata. All parameters are named.

Basic usage

text
Released in {{< badge text="v0.8.0" >}} and later.

Released in v0.8.0 and later.

Variants

The variant parameter controls the color. All variants derive their color from the theme palette and adapt automatically in light and dark mode.

Variant Use for
default General labels, version numbers
tip New features, additions
important Key information, notable changes
warning Experimental, subject to change
danger Deprecated, breaking, removed
neutral Status labels, categories
text
{{< badge text="Default" >}}
{{< badge text="New" variant="tip" >}}
{{< badge text="Important" variant="important" >}}
{{< badge text="Experimental" variant="warning" >}}
{{< badge text="Deprecated" variant="danger" >}}
{{< badge text="Stable" variant="neutral" >}}

Default New Important Experimental Deprecated Stable

Add href to make the badge a clickable link:

text
{{< badge text="Migration guide" variant="danger" href="/docs/migration/" >}}
Migration guide

In headings and tables

Badges work inline in Markdown headings and table cells:

markdown
## Feature name {{< badge text="Beta" variant="warning" >}}

| API | Status |
|-----|--------|
| `renderMathInElement` | {{< badge text="Stable" variant="neutral" >}} |
| `fileTree` | {{< badge text="New" variant="tip" >}} |

Parameters

Parameter Default Description
text required Label text.
variant "default" Color variant. See the table above.
href (none) URL. Makes the badge a link.