# Label (`.z-label`)

> Compact solid-filled pill label with seven color schemes.

- **Kind:** css
- **Category:** general

## CSS Variables

| Variable | Default | Scope | Affects | Description |
| --- | --- | --- | --- | --- |
| `--z-label-bg` | `var(--z-bg)` | `.z-label` | `background-color` | Background color of the label. |
| `--z-label-bg-o` | `100%` | `.z-label` | `background-color` | Opacity applied to the background color. |
| `--z-label-border` | `var(--z-border)` | `.z-label` | `border-color` | Border color. |
| `--z-label-border-o` | `var(--z-border-o)` | `.z-label` | `border-color` | Opacity applied to the border color. |
| `--z-label-color` | `var(--z-bg-f)` | `.z-label` | `color` | Text color. |
| `--z-label-color-o` | `100%` | `.z-label` | `color` | Opacity applied to the text color. |
| `--z-label-shadow` | `var(--z-global-shadow)` | `.z-label` | `box-shadow` | Box shadow; falls back to the global shadow. |

## CSS Classes

| Class | Role | Applies to | Description |
| --- | --- | --- | --- |
| `.z-label` | `root` | `.z-label` | Inline solid-filled pill for short labels. |
| `.z-label-danger` | `modifier` | `.z-label` | Danger color scheme with white text. |
| `.z-label-destructive` | `modifier` | `.z-label` | Destructive color scheme from the destructive palette tokens. |
| `.z-label-info` | `modifier` | `.z-label` | Info color scheme with white text. |
| `.z-label-primary` | `modifier` | `.z-label` | Primary color scheme. |
| `.z-label-secondary` | `modifier` | `.z-label` | Secondary color scheme. |
| `.z-label-success` | `modifier` | `.z-label` | Success color scheme with white text. |
| `.z-label-warning` | `modifier` | `.z-label` | Warning color scheme with white text. |

## Notes

- Labels are solid-filled; badges use faint tints for their semantic schemes.
- Hovering fades the label to 80% opacity with a short background transition.

## Guides

- [Styling with cls and stl](https://next.0build.dev/docs/guides/styling.md)
- [Translating Components](https://next.0build.dev/docs/guides/i18n.md)
- [Icon Resolution](https://next.0build.dev/docs/guides/icons.md)
- [The data-source Convention](https://next.0build.dev/docs/guides/data-source.md)
- [Openers & Triggers](https://next.0build.dev/docs/guides/triggers.md)
- [Dialog Behavior](https://next.0build.dev/docs/guides/dialogs.md)
- [Utilities](https://next.0build.dev/docs/guides/utilities.md)
- [Runtime](https://next.0build.dev/docs/guides/runtime.md)
