Component Library v5.3 Responsive (mobile+tablet+desktop) · Chunk 1.5 patterns
v5.1 additions

What v5 missed.

v5 shipped a single-layer icon rail and used "Y" / "G" / "R" letter chips. Poom flagged both. This file is the corrected reference for: two-layer rail, Section Nav, user-facing tier labels, Attention indicator + stack, floating Ask button, contextual Consult CTAs (with invisible triage for KTAXA users), and the Mental weekly check-in entry. Downstream chunks (Physical Pillar / Trends / Consult flow / Mental Pillar) inherit these patterns from here, not from v5.

Section 01

Tier labels — user-facing words, not letters

Per-biomarker reading uses Status (Good / Okay / Attention / Risk — granular). Whole-person tier uses user-facing words: Healthy / Monitor / Action needed. The technical tier color word (Yellow / Green / Red) appears only on data-transparency surfaces where the audience is KTAXA reps.

Primary tier label (use everywhere user-facing)
Healthy Monitor Action needed
Compact inline variant — for tight cards
Healthy Monitor Action needed

DO NOT use single-letter chips (Y/G/R) anywhere user-facing. v5 anti-pattern, killed in 5.1.

Technical tier word — for data-transparency surfaces ONLY ("For your insurance" view)
Green Yellow Red

Use only in: "For your insurance" transparency view (KTAXA-readable layer), backend exports, internal docs. Never in regular dashboard UI.

Section 02

Two-Layer Rail — Module Rail + Section Nav

Layer 1 = platform-level module switcher (52px). Layer 2 = sub-pages of the selected module (200px). Pattern inherited from TigerSoft / OpenSpace (`02_workforce_overview.html`). Click any Layer 1 icon below to swap the Layer 2 view.

Content area · selected module's surface lives here

When user lacks entitlement (e.g., no HRIS for Work Wellbeing), the icon is hidden entirely — not rendered. Phase 4+ icons stay visible but dim with a small dot.

Section 03

Attention Indicator + Stack

NOT a notification bell. Wellbeing alerts are persistent states ("a marker has been Red for 3+ months"), not transient messages. The topbar icon counts items needing attention; clicking routes to Overview where the AttentionStack compiles them cross-pillar.

Topbar — empty state
Nothing needs your attention right now
Topbar — 3 items
3 Click → Overview · AttentionStack
AttentionStack — Overview top-of-page
Items in your blood test need attention
LDL 138 · Fasting Glucose 128 · 2 markers in action zone
Your weekly check-in dropped this month
Score went from 76 to 58 over the past 4 weeks
Your annual checkup is due
11 months since your last full panel
Section 04

Floating Ask button — Whoop-style

Global AI assistant. Persistent across every surface. Knows the current page + open modal as context. Bottom-right, blue (the only non-green CTA color in Wellnest besides Consult cyan). Every page must reserve a 72×72px clear zone in the bottom-right corner so the button never overlaps critical UI.

Imaginary dashboard content area · 72×72px clear-zone (dashed) reserved bottom-right

Mobile: button moves to bottom: 80px to clear the bottom nav. Hide entirely during modal takeover.

Section 05

Contextual Consult CTAs + invisible triage

Consult entry has two models: a persistent Layer 1 icon, AND contextual buttons scattered at every "should I worry?" surface. Both route through the same flow; contextual buttons carry context automatically. For KTAXA-covered users, the flow runs an invisible Triage step first (KTAXA-proprietary care pathway logic). Non-KTAXA users skip triage entirely.

Solid CTA — Red biomarker context

Used on Red biomarker cards, AttentionStack, modal drill-down with high tier.

Ghost CTA — Yellow biomarker context

Used on Yellow biomarker cards — softer prompt, not urgent.

Triage result (KTAXA-covered users see this — non-KTAXA skip it)
Recommended care

Pharmacist consult

Based on what you've told us and your recent readings, a pharmacist consult is the right level of care here. They can review your medications, answer questions, and recommend whether you need to escalate.

Why we recommended this

Triage logic is KTAXA-proprietary IP. Other insurance partners don't get it. Non-KTAXA-covered users go straight to a consult-type selector after clicking any consult CTA.

Canonical branded button shadows — §P

✅ DO: Use colored shadows on filled primary buttons for Consult (cyan rgba(6,182,212,…)) and Mental (violet rgba(124,58,237,…)). These reinforce module accent identity on interactive elements. Focus rings use the same color at 0 0 0 3px rgba(…,0.15).

❌ DON'T: Use colored shadows on cards, tiles, or ghost buttons — those use the neutral no-lift hover (0 2px 8px rgba(0,0,0,.07)) per §23.2.

Section 06

Mental Weekly Check-in — entry card

Sandbox feedback killed the daily-pulse model. Mental cadence standardizes on weekly (1-2 week intervals, matches WHO-5's 2-week recall window). Workplace daily-pulse stays as a Phase 3 placeholder only.

Mental Wellbeing — weekly entry card

Weekly check-in

Due today

5 questions about how you've felt the past 2 weeks. Takes about 90 seconds.

Section 07

Pillar tiles — corrected (no letter chips)

v5 used "Y" / "G" / "R" letter chips on pillar tiles. v5.1 replaces them with full user-facing tier labels (Healthy / Monitor / Action needed) in the inline variant.

Monitor
Physical Health
76 / 100
2 items need attention
Healthy
Mental Wellbeing
82 / 100
Weekly check-in · last 30 days
Action needed
Work Wellbeing
58 / 100
Burnout signal detected
Section 08 · v5.2

Biomarker card (.bm-card)

The primary data unit on the Physical pillar. Three tier states: Healthy (no stripe, clean white), Monitor (yellow left stripe), Action needed (red left stripe). Stripe signals urgency — not a tint. Card body is always white.

Healthy (green) — no stripe
HDL Cholesterol
High-density lipoprotein
Good
58 mg/dL ▲ +4
<4058High

Green cards carry no left stripe and no background tint — clean white only.

Monitor (yellow) — yellow left stripe
HbA1c
3-month average blood sugar
Okay
5.9 % ▲ +0.3
<5.75.9≥6.5

Add class tier-yellow to bm-card to render the 3px yellow left stripe.

Action needed (red) — red left stripe + consult CTA
LDL Cholesterol
Low-density lipoprotein
Risk
138 mg/dL ▲ +12
<100138≥160

Red cards get solid .consult-cta. Yellow "Monitor" cards with attn status get .consult-cta--ghost. Green cards: no CTA.

✓ Do
  • Stripe color matches the tier: yellow stripe → Monitor, red stripe → Action needed
  • Card body is always white — never tint the background
  • Status badge (4-color granular) + tier label (3-color user-facing) both present
  • Range bar zones reflect bidirectional clinical truth per biomarker
  • Source badge on every card — every datapoint knows where it came from
✗ Don't
  • Don't tint the card body — stripe is the only urgency signal on the card
  • Don't use a single gradient for all biomarker range bars — zones are per-biomarker
  • Don't show single-letter tier chips (Y/G/R) — always user-facing words
  • Don't mix Status badge and Tier label — they're different; both are needed
  • Don't put a consult CTA on Healthy (green) tier cards
Section 09 · v5.2

Zone-aware range bar (.range-bar-zoned-wrap)

Each biomarker has clinically-defined zones — bidirectional where both too-low and too-high are dangerous. The teardrop marker points down from above the bar, colored to match the zone the current value falls in. Zones are flat fills (no gradient) so boundaries stay clearly distinct.

Unidirectional — lower is better (LDL: 138 mg/dL = Risk)
<100 138 mg/dL ≥160
Bidirectional — both extremes dangerous (FBS: 95 mg/dL = Good)
<54 95 mg/dL ≥126
Unidirectional — higher is better (HDL: 58 mg/dL = Good)
<40 58 mg/dL High
Monitor zone (HbA1c: 5.9% = Okay)
<5.7 5.9% ≥6.5
Implementation note

The teardrop marker position (left: X%) is computed by JS at render time from the BM_ZONES data structure — see renderZonedBar() in 03_physical-pillar-biomarkers.html. Never hard-code percentages in production. The marker color class (zone--good / --okay / --attn / --risk) is determined by which zone the current value falls into. Do NOT use a single green→yellow→red gradient — each zone must have a clearly distinct flat color.

Section 11 · v5.2

Source badge + Phase 3 placeholder card

Every datapoint carries a source badge — trust is built on knowing where data came from. Phase 3 placeholder cards use dashed borders + amber badge to signal "this is coming, not missing."

Source badges (.badge-source) — all variants
Checkup 2025 CGM · Daily avg Body comp scale Manual entry Whoop · 30-day avg Apple Health

Use the same pill shape + paper-cool background everywhere. Icon + source name. Maximum 2 words after the icon.

Phase 3 placeholder card (.placeholder-card)
Phase 3
Sleep Quality
Your sleep score and recovery data will appear here when you connect a compatible wearable. Coming in Phase 3.

Dashed border signals "not yet available" (different from a locked or dim state). Amber badge = Phase 3. Purple badge was retired — amber is canonical .badge-phase--p3.

✓ Do
  • Put a source badge on every single datapoint — no exceptions
  • Use dashed border for Phase 3 placeholder cards
  • Use amber (rgba(245,158,11,0.12) + #92400e) for the P3 badge
  • Label the card with the feature name and explain what it needs (wearable, etc.)
✗ Don't
  • Don't omit source badges — unknown origin kills trust
  • Don't use violet/purple for the Phase 3 badge — amber only (.badge-phase--p3)
  • Don't dim or lock Phase 3 placeholders — dashed border is the correct signal
  • Don't mix Phase 3 placeholder style with Phase 4+ placeholders (also dashed but should be labeled differently)
Section 12 · v5.2

Biomarker history report (.report-header, .dr-header)

One canonical report artifact serves two contexts: (1) shared with the PharmCare doctor at consult time as a data preview in step 3 of the consult flow, and (2) exported from Health Passport as a downloadable PDF. The report header uses a green gradient top-stripe + 2-col patient/report-meta layout. Optimised for both screen and print.

Report header + patient / report-meta layout
WELLNEST
Somchai Jaidee
สมชาย ใจดี
DOB 1985-04-12
Sex M
EMP ID TS-00419
Health Report
Jan 2023 — Jan 2025
RPT-2025-0419
Monitor
2 Action needed  ·  5 Monitor  ·  17 Healthy
Generated by Wellnest · 21 May 2026

The 4px top-stripe gradient is applied via .report-header::before. The report wraps biomarker cards from the standard bm-card pattern but in a print-optimised layout (single-column, print @media CSS). Full implementation: 13_biomarker-report.html.

✓ Do
  • Use the same report artifact for both consult-share (screen) and Passport export (PDF/print)
  • Include the green gradient top-stripe on the report header — brand signature
  • Show the 2-col patient / report-meta layout at the top (dr-header)
  • Include an overall tier label on the report — KTAXA and doctors both read it
  • Layer 1 only (24 standard biomarkers) in Phase 2 — no wearable data in the report until Phase 3
✗ Don't
  • Don't build two separate report templates — one canonical artifact, two delivery contexts
  • Don't include wearable data (Whoop, Apple Health, Garmin) in the Phase 2 report
  • Don't expose raw employee IDs without an anonymous ID where required by PDPA
  • Don't skip the print @media CSS — the report must print correctly for doctors who print
02_component-library.html · v5.3 · 2026-05-27