Components / Base
Badge
Shared label primitive for status pills, identifiers, and domain metadata. Extends the shadcn/ui Badge with Instant Strata semantic variants. Application components compose this shell so tone, sizing, and icons stay consistent across scheme, lot, owner, task, and document surfaces.
Installation
npx shadcn add https://raw.githubusercontent.com/levi-putna/elements/main/registry/badge/registry.jsonOrganisation
Use domain badges in product UI. Each maps a fixed set of states onto the same variant palette:
- accent: active, paid, automatable, portal active, in progress
- warning: onboarding, due review, R-A-S, invited
- destructive: attention, overdue, failed, escalated, manual required
- default: archived, manual, not registered, snoozed, neutral metadata
- mono: SP plan numbers, lot numbers, file extensions
- outline: correspondence preference, work item domain
Soft status backgrounds pair with saturated text: warning uses text-warning; destructive uses text-danger.
import { Badge } from "@/components/ui/badge"
import { SchemeStatusBadge } from "@/components/ui/scheme"
// Prefer domain badges in product UI
<SchemeStatusBadge status="active" />
// Raw Badge for one-off labels
<Badge variant="accent">Paid</Badge>Foundation variants
Base tones for one-off labels or custom compositions.
Scheme badges
Portfolio lifecycle and strata plan identifiers.
Lot badges
Lot references, levy status, and AGM proxy eligibility.
Owner badges
Legal form, portal registration, correspondence, and committee role.
Task badges
Workflow states, automation class, business domain, and due dates.
Document badges
File extension labels using brand colours from the document thumb art.
API
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "secondary" | "accent" | "info" | "warning" | "destructive" | "outline" | "mono" | "ghost" | "default" | Semantic tone. Domain badges map their states onto these variants consistently. |
| size | "sm" | "md" | "lg" | "md" | Padding and type size. Identifier badges (SP, Lot) typically use sm. |
| icon | LucideIcon | - | Optional leading icon at 14px (size-3.5). |
| hideIcon | boolean | false | Suppress the icon in dense table cells. |