Badge
Hextra inline badges with color variants and optional icons.
1 minute read
Inline badges with color variants. Supports both positional and named parameter forms.
{{< hextra/badge "Simple badge" >}}
{{< hextra/badge content="Styled" color="green" link="https://example.com" icon="document-text" >}}
Parameters:
| Parameter | Description | Default |
|---|---|---|
content | Badge text (or use positional param) | (required) |
color | Color: gray, green, blue, yellow, red, purple, orange, indigo, amber | gray |
link | Optional URL to wrap the badge as a link | (none) |
icon | Optional icon name from data/hextra/icons.yaml | (none) |
Color variants:
Default Success Info Warning Error Important Amber
With a link: Visit Hugo
With an icon: Documentation