generalcss

Badge

Small pill for counts and short statuses with four semantic color schemes.

CSS Variables

VariableDefaultScopeDescription
--z-badge-bgvar(--z-bg).z-badgeBackground color of the badge.
--z-badge-bg-o100%.z-badgeOpacity applied to the background color.
--z-badge-bordervar(--z-border).z-badgeBorder color.
--z-badge-border-ovar(--z-border-o).z-badgeOpacity applied to the border color.
--z-badge-colorvar(--z-bg-f).z-badgeText color.
--z-badge-color-o100%.z-badgeOpacity applied to the text color.
--z-badge-shadow · hookvar(--z-global-shadow).z-badgeBox shadow; falls back to the global shadow.

CSS Classes

ClassRoleApplies toDescription
.z-badgeroot.z-badgeInline pill for counts and short statuses.
.z-badge-dangermodifier.z-badgeDanger color scheme with a faint tinted background.
.z-badge-infomodifier.z-badgeInfo color scheme with a faint tinted background.
.z-badge-successmodifier.z-badgeSuccess color scheme with a faint tinted background.
.z-badge-warningmodifier.z-badgeWarning color scheme with a faint tinted background.