Badge
Mono uppercase label with ink stroke in 8 solid variants (status + brand colors), two sizes, optional square status dot and a tilted sticker mode.
brutalist/ui/badgeSource
import type { HTMLAttributes } from "react";
import { cn } from "@/lib/utils";
export type BadgeVariant = "neutral" | "primary" | "secondary" | "accent" | "success" | "warning" | "danger" | "ink";
const VARIANTS: Record<BadgeVariant, string> = {
neutral: "bg-da-surface text-da-surface-fg",
primary: "bg-da-primary text-da-primary-fg",
secondary: "bg-da-secondary text-da-secondary-fg",
accent: "bg-da-accent text-da-accent-fg",
success: "bg-da-success text-da-success-fg",
warning: "bg-da-warning text-da-warning-fg",
danger: "bg-da-danger text-da-danger-fg",
ink: "bg-da-fg text-da-bg",
};
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
variant?: BadgeVariant;
size?: "sm" | "md";
/** Square status dot before the label. */
dot?: boolean;
/** Tilt the badge like a sticker (use sparingly — one per view). */
sticker?: boolean;
}
export function Badge({ variant = "neutral", size = "sm", dot = false, sticker = false, className, children, ...props }: BadgeProps) {
return (
<span
className={cn(
"da-stroke inline-flex items-center gap-1.5 font-da-mono font-bold tracking-da-label whitespace-nowrap uppercase",
size === "sm" ? "px-1.5 py-0.5 text-[10px]" : "px-2.5 py-1 text-xs",
sticker && "-rotate-3 shadow-da-sm",
VARIANTS[variant],
className,
)}
{...props}
>
{dot && <span aria-hidden className="size-2 bg-current" />}
{children}
</span>
);
}
export default Badge;
modules/brutalist/ui/badge/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "neutral" | "primary" | "secondary" | "accent" | "success" | "warning" | "danger" | "ink" | "neutral" | Color pair. |
| size | "sm" | "md" | "sm" | Size preset. |
| dot | boolean | false | Show a square status dot (decorative). |
| sticker | boolean | false | Rotate -3° with a hard shadow. |
| ...rest | HTMLAttributes<HTMLSpanElement> | — | Native span attributes. |
Other badge variants in Brutalist
Counter Badge
Notification counter that wraps any element (icon button, avatar) and pins a ruled square count to its corner; caps at max+, dot mode, three tones, hidden at zero.
Sticker Badge
Round SVG sticker badge: dashed scalloped edge, text running around a circular path, big center label, hard offset drop shadow and a slight tilt. Four solid tones, any size.
Tag List
Editable tag field: color-cycling ruled chips with remove buttons inside a boxed input, Enter/comma to add, Backspace to remove last, quick-add suggestion chips and a max limit.
Badge in other art directions
Avatar Stack
Overlapping gradient initials avatars inside a glass pill with a dark “+N” overflow bubble and a count label; avatars lift on hover.
Badge
Pill badge in frosted glass, gradient or tinted status variants (primary, success, warning, danger) with optional dot, glowing live dot and leading icon. Two sizes.
Presence Avatar
Gradient initials avatar with a presence dot (online, busy, away, offline); the “speaking” state adds a spinning conic gradient ring. Three sizes.
Reaction Chip
Slack-style emoji reaction chips in glass: click to add/remove your reaction, the count pops, and reacted chips get a primary ring and tint.
Badge
Small tinted label (neutral, accent, success, warning, danger, outline) with optional status dot, live pulse, pill shape and mono mode for IDs and service names.
Kbd Hint
Keyboard shortcut hint made of raised keycaps: combos (⌘ K), sequences (G then I) and an optional action label. Symbols get spoken names for screen readers.
Severity Badge
Incident severity badge: four signal bars filled according to level (SEV1–SEV4) with a mono code and optional label, so color is never the only cue.
Status Badge
Service status pill (operational, degraded, major outage, maintenance, no data) with a colored dot that pulses during incidents; soft, outline and dot-only variants.
Badge
Square mono tag in four variants: hairline outline, ink solid, subtle gray and signal orange (for “New” only).
Index Counter
Editorial index counter “03 / 12” in mono with zero padding and an optional hairline progress bar — for galleries, slides and case-study chapters.
Kbd
Keyboard shortcut hint: square hairline key caps in mono, joined, with an optional muted action label — e.g. “⌘ K Search”.
Status Dot
Minimal status indicator: a 6px dot (filled, hollow or pulsing signal for “building”) followed by a mono uppercase label.
Badge
Compact 4px-radius label in six tones × three variants (soft, outline, solid), two sizes, optional leading icon.
Delta Badge
KPI delta chip: arrow + signed percentage, green when the change is favourable and red otherwise (`invert` for metrics where down is good), optional “vs last month”.
Filter Chips
Active-filter bar: “field: value” chips with a remove (×) button each, a result-count region and “Clear all”; announces removals.
Status Badge
Invoice/payment lifecycle status pill with a colored dot: draft, sent, viewed, paid, partial, overdue, void.
Badge
Soft rounded pill label in natural tints (sage, clay, sand, forest, sun, berry), two sizes, optional leading icon.
Impact Badge
Impact/effort rating shown as three leaves (filled up to the level) with a text label — used on reduction actions.
Scope Badge
GHG scope indicator: a leaf-shaped chip with the scope number (forest / sage / clay) and an optional label; title explains the scope.
Status Pill
Target/action progress pill with a soft pulsing dot for active states (on track, at risk, off track) and static ones (done, not started).
Badge
Rounded pastel pill badge in seven tones (peach, mint, lavender, butter, neutral, primary, danger) and two sizes, with optional emoji/icon or dot.
Label Tags
Editable label set: pastel tags (rotating colors) with round × buttons and a dashed “+ Add label” pill that becomes an inline input (Enter adds, Escape cancels).
Status Dot
Task status indicator: colored dot in a soft halo plus label (To do, In progress (pulsing), In review, Done, Blocked); compact dot-only mode keeps a hidden label.
Streak Badge
Gamified streak badge: flame + “12-day streak” on a butter pill and seven round weekday dots, peach with a check on active days.