generalcss
Badge
Small pill for counts and short statuses with four semantic color schemes.
CSS Variables
| Variable | Default | Scope | Description |
|---|---|---|---|
--z-badge-bg | var(--z-bg) | .z-badge | Background color of the badge. |
--z-badge-bg-o | 100% | .z-badge | Opacity applied to the background color. |
--z-badge-border | var(--z-border) | .z-badge | Border color. |
--z-badge-border-o | var(--z-border-o) | .z-badge | Opacity applied to the border color. |
--z-badge-color | var(--z-bg-f) | .z-badge | Text color. |
--z-badge-color-o | 100% | .z-badge | Opacity applied to the text color. |
--z-badge-shadow · hook | var(--z-global-shadow) | .z-badge | Box shadow; falls back to the global shadow. |
CSS Classes
| Class | Role | Applies to | Description |
|---|---|---|---|
.z-badge | root | .z-badge | Inline pill for counts and short statuses. |
.z-badge-danger | modifier | .z-badge | Danger color scheme with a faint tinted background. |
.z-badge-info | modifier | .z-badge | Info color scheme with a faint tinted background. |
.z-badge-success | modifier | .z-badge | Success color scheme with a faint tinted background. |
.z-badge-warning | modifier | .z-badge | Warning color scheme with a faint tinted background. |