Inline Badges#
Guides often need a small status label next to a heading or in a sentence —
beta, required, deprecated. {badge:variant} markup is opt-in and off by
default.
| Option | Type | Default |
|---|---|---|
badges |
boolean / BadgeOptions |
false |
import { oxContent } from "@ox-content/vite-plugin";
export default {
plugins: [
oxContent({
badges: true,
}),
],
};
false or omitted leaves the source unchanged. true or an object enables
the built-in variants.
Authoring#
The form is {badge:VARIANT}TEXT{/badge}. VARIANT is lowercase and
case-sensitive.
Beta Note Info Warning Danger Stable Deprecated Required
API {badge:tip}Beta{/badge} — the `token` field is {badge:required}required{/badge}.
API Beta — the token field is required.
Allowed variants: tip, note, info, warning, danger, success,
deprecated, and required.
Unknown, uppercase, empty, or unclosed tags stay literal. Badge text is HTML-escaped; fenced, indented, and inline code are not rewritten.
`{badge:tip}ignored{/badge}`
{badge:tip}ignored{/badge}
Related#
- NotByAI Badge — human-authorship disclosure, not a status label
- Custom Containers
- Keyboard Keys
- Built-in Features overview