← Back to Index

Status Badge Figma: badge / fdetail-badge atom

Updated: 2026-07-14 11:17 ET

Audited: 2026-07-14 11:17 ET

Small typed status pill — a typed Kind enum maps to a fixed background/text colour pair.
Implementation decision D52 (2026-07-14) — corrects this draft against the 6 real light-surface consumers. Tier per D40: scaffold/atom.
Shared atom — composed, not extended. Status Badge is one of the two shared atoms named in decision D40. Other controls compose it for visual consistency; there is no shared base class. The badge carries semantic meaning through a typed Kind enum that resolves to a colour — this replaces the scaffold's abuse of --kcm / --cass as generic colour aliases (see the scaffold's alpa-policy-badge--active/monitor/info/virtual "colour alias" comment). A badge's colour is chosen by its meaning, never by hand-picking another domain's badge class.
D52 scoped this atom to the 6 light-surface (alpa-policy-badge*) consumers only — the dark-surface alpa-fdetail-badge* usage (JumpseatDetailsPage.razor, 2 badges) is intentionally NOT merged in. Real-code check found Kind=Kcm resolves to a different colour in each context: light-surface Kcm is a green tint (#e8f5e9/#2a8a4c), but the dark-surface "KCM Eligible" badge is solid blue (var(--alpa-blue)/white) — the same Kind value, two different meanings, which breaks this component's own "colour is determined by Kind" principle if forced together. This draft's original Size parameter (Sm/Md) assumed they could compose cleanly; they can't without either a colour override escape hatch (defeats the purpose) or splitting Kcm into two values. Left as a flagged finding for design confirmation, not resolved unilaterally — see D52. Size is not implemented in this pass.

Live CSS Preview

Implemented — tint & solid fills, all 6 real consumers KCM CASS Active Monitor Virtual Info
NOT implemented — dark-surface fdetail-badge, deferred per D52 (flagged conflict) Nonstop KCM

Kind → Colour Mapping

The Kind enum is the single source of truth for badge colour. Each value pins a background + text pair.

KindFill styleBackgroundTextMeaning / usage
Kcmtint #e8f5e9#2a8a4c greenKCM-eligible flight / Known Crewmember
Casstint #dfedf9#007bc2 blueCASS program eligibility
Activesolid #16a34awhiteActive / enabled / confirmed status
Monitorsolid #007bc2whiteUnder monitoring / advisory
Virtualsolid #7c3aedwhiteVirtual / online-only
Infosolid #007bc2whiteGeneral informational tag

Note: Kcm and Active are both green but distinct — Kcm is a soft tint pill (eligibility marker on a light surface), Active is a solid fill (state). Monitor and Info share blue solid today; they remain separate enum values so they can diverge without a data migration.

Design Tokens

Dimensions — Small (sm)

Padding
2px 6px
Border-radius
3 px
Font size
10 px
Font weight
700
Letter spacing
0.5 px
Text transform
uppercase

Dimensions — Medium (md, on-dark)

Padding
3px 8px
Border-radius
3 px
Font size
11 px
Font weight
600
Letter spacing
0.4 px
Neutral on-dark
bg rgba(255,255,255,0.15) · text rgba(255,255,255,0.85)

Typography

Font family
Font Family/Body (Futura PT Demi) — eyebrow style

Colours (see Kind → Colour table)

Kcm bg / Cass bg
#e8f5e9 / #dfedf9
Active / Monitor / Virtual / Info
#16a34a · #007bc2 · #7c3aed · #007bc2

Layer Tree

└── badge [Kind] · inline-block · radius:3px · padding:2px 6px (sm)
    └── [Label] · TEXT · Futura PT Demi 10px · uppercase · ls:0.5px

ViewModel

Tier: atom. Implemented in both namespace copies per the current dual-write convention. Size is not implemented — see the D52 callout above.

└── StatusBadgeViewModel : ComponentViewModel
    ├── Label : string — badge text (e.g. "KCM", "Active")
    ├── Kind : StatusBadgeKind — enum → colour (Kcm · Cass · Active · Monitor · Virtual · Info)
    └── MarginTop : bool — top spacing for badges below body text (scaffold's --mt modifier)

Blazor Component API

Actual home: ALPAMobile.Presentation/Components/Library/StatusBadge.razor (migrated 2026-07-15, WI-2254/D61).

ParameterTypeRequiredDescription
VmStatusBadgeViewModelYesLabel/Kind/MarginTop state.

Razor Usage (actual)

@* Composed inside other controls — never colour-by-class *@
<StatusBadge Vm="@(new StatusBadgeViewModel { Label = "PILOTS", Kind = StatusBadgeKind.Kcm })" />
<StatusBadge Vm="@(new StatusBadgeViewModel { Label = "VIRTUAL", Kind = StatusBadgeKind.Virtual, MarginTop = true })" />

CSS Class Reference (actual)

Classes live in ALPAMobile/wwwroot/css/alpa-components.css under the alpa-status-badge block (renamed from alpa-policy-badge*). alpa-fdetail-badge* is untouched — see the D52 callout.

ClassScopeKey rules
.alpa-status-badgeBasedisplay:inline-block; font-family:var(--alpa-eyebrow); border-radius:3px
.alpa-status-badge--smSize (only size built)font-size:10px; font-weight:700; letter-spacing:0.5px; padding:2px 6px; text-transform:uppercase
.alpa-status-badge--kcmKindbackground:#e8f5e9; color:#2a8a4c
.alpa-status-badge--cassKindbackground:#dfedf9; color:#007bc2
.alpa-status-badge--activeKindbackground:#16a34a; color:#fff
.alpa-status-badge--monitorKindbackground:#007bc2; color:#fff
.alpa-status-badge--virtualKindbackground:#7c3aed; color:#fff
.alpa-status-badge--infoKindbackground:#007bc2; color:#fff
.alpa-status-badge--mtSpacing modifiermargin-top:4px

Usage Context (actual, all 6 real consumers)

ScreenLabelKindMarginTop
Airline Policies (2 usages)ALPA / CASSKcm / CassNo
AdvocacyACTIVE / MONITOR (conditional)Active / MonitorNo
MEC EventsVIRTUALVirtualYes
MEC HotelsCONTRACT HOTELActiveYes
KCM Airlines (2 usages)PILOTS / FLIGHT ATTENDANTSKcm / CassNo
KCM Policies Search (2 usages)PILOTS / FLIGHT ATTENDANTSKcm / CassNo

Info is defined in the CSS/enum but has no real consumer yet — kept for forward use per the original spec's reasoning (Monitor/Info may diverge later without a data migration).

Developer Notes