Skip to content

Badge

Place a badge comment immediately after inline code to render it as a styled badge. On GitHub it’s inline code. In Starlight it’s a colored label.

This feature is New and ready for use.

View Markdown source
This feature is `New`<!-- badge variant:tip --> and ready for use.
  • Default — Default style
  • Note — Informational
  • Tip — Positive / new
  • Caution — Warning
  • Danger — Critical
View Markdown source
- `Default`<!-- badge --> — Default style
- `Note`<!-- badge variant:note --> — Informational
- `Tip`<!-- badge variant:tip --> — Positive / new
- `Caution`<!-- badge variant:caution --> — Warning
- `Danger`<!-- badge variant:danger --> — Critical

Badges work in headings too — useful for marking API status.

View Markdown source
### Authentication `Beta`<!-- badge variant:caution -->
### Webhooks `Deprecated`<!-- badge variant:danger -->
  • Small — Default size
  • Medium — Medium
  • Large — Large
View Markdown source
- `Small`<!-- badge variant:tip size:small --> — Default size
- `Medium`<!-- badge variant:tip size:medium --> — Medium
- `Large`<!-- badge variant:tip size:large --> — Large
ContextRendering
GitHubInline code (e.g. New, Beta)
StarlightStyled badge with variant color
ParameterValuesDefaultDescription
variantdefault, note, tip, caution, dangerdefaultBadge color variant
sizesmall, medium, largesmallBadge size
<span class="sl-badge tip small">New</span>