Components

Badge

A small status indicator with thick borders and flat shadow across five semantic variants.

Preview

Default

Usage

Import
import { NbBadge } from '@ng-brutalism/ui';
Template
<span nbBadge>Default</span>

Variants

DefaultSecondarySuccessWarningDanger

Customization

Override these CSS variables on :root, a wrapper, or the component element. More local values win, so per-instance styling can sit directly on the element.

Token Default Used for
--nb-badge-bg #fff Badge background, reassigned by variant
--nb-badge-fg var(--nb-foreground) Badge text color, reassigned by variant
--nb-badge-border var(--nb-border) Badge border color
--nb-badge-radius 9999px Badge corner radius
--nb-badge-shadow 2px 2px 0 var(--nb-shadow) Badge shadow
--nb-border #000000 Border color and focus ring color
--nb-shadow #000000 Offset shadow color
--nb-radius 0rem Corner radius through the rounded-nb utility
--nb-shadow-offset-x 4px Horizontal shadow and press offset
--nb-shadow-offset-y 4px Vertical shadow and press offset
--nb-foreground #000000 Default foreground text color
--nb-background #ffffff Default surface background color

API

InputTypeDefault
variant 'default' | 'secondary' | 'success' | 'warning' | 'danger' 'default'