Elements

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

tsx
npx shadcn add https://raw.githubusercontent.com/levi-putna/elements/main/registry/badge/registry.json

Organisation

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.

tsx
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.

All variants
DefaultSecondaryAccentInfoWarningDestructiveOutlineMonoGhost
Sizes
SmallMediumLarge
With icon
VerifiedBookmark

Scheme badges

Portfolio lifecycle and strata plan identifiers.

SchemePlanBadge
SP 1042SP 8821
SchemeStatusBadge (all states)
ActiveOnboardingArchivedNeeds attention
Dense table (hideIcon)
ActiveOnboardingArchivedNeeds attention

Lot badges

Lot references, levy status, and AGM proxy eligibility.

LotBadge sizes
Lot 12Lot 12Lot 12
LotLevyBadge (all states)
PaidDueOverdueNot assessed
LotProxyBadge
Proxy eligibleIneligible

Owner badges

Legal form, portal registration, correspondence, and committee role.

OwnerTypeBadge
IndividualCompanyJoint
OwnerPortalBadge
Portal activeInvitedNot registered
OwnerCorrespondenceBadge
EmailPostPortal
OwnerCommitteeBadge
Committee

Task badges

Workflow states, automation class, business domain, and due dates.

WorkItemStatusBadge (all states)
PendingIn progressAwaiting reviewApprovedSentCompletedFailedManual requiredEscalatedSnoozed
WorkItemAutomationBadge
AutomatableR-A-SManual
WorkItemDomainBadge
MeetingsAccountingMaintenanceInsuranceAdminDisputesCommunicationContractors
WorkItemDueBadge
Due 1 JulyStatutory 10 JuneStatutory 30 MayFollow up 20 June

Document badges

File extension labels using brand colours from the document thumb art.

DocumentTypeBadge (all types)
PDFDOCXLSPPTIMGZIPTXTFolderFile

API

PropTypeDefaultDescription
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.
iconLucideIcon-Optional leading icon at 14px (size-3.5).
hideIconbooleanfalseSuppress the icon in dense table cells.