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.
Basic usage
Section titled “Basic usage”This feature is New and ready for use.
View Markdown source
This feature is `New`<!-- badge variant:tip --> and ready for use.Variants
Section titled “Variants”- 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 --> — CriticalIn headings
Section titled “In headings”Badges work in headings too — useful for marking API status.
Authentication Beta
Section titled “Authentication Beta”Webhooks Deprecated
Section titled “Webhooks Deprecated”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 --> — LargeHow it renders
Section titled “How it renders”| Context | Rendering |
|---|---|
| GitHub | Inline code (e.g. New, Beta) |
| Starlight | Styled badge with variant color |
Parameters
Section titled “Parameters”| Parameter | Values | Default | Description |
|---|---|---|---|
variant | default, note, tip, caution, danger | default | Badge color variant |
size | small, medium, large | small | Badge size |
HTML output
Section titled “HTML output”<span class="sl-badge tip small">New</span>