🎨 Design System · Tailwind Component Library · MediEco · 26 April 2026
← Hub DESIGN SYSTEM Doc Zam mock canonical

Design System Β· UI Component Library

Color palette Β· typography Β· components Β· layout patterns Β· Filament theme Β· accessibility Β· per Doc Zam mock canonical UX.

1. 🎨 Color Palette

Based on Doc Zam mock screens Β· blue/teal primary Β· emerald/violet/amber accents Β· semantic colors.

1a. Primary (Blue/Teal)

sky-500 #0ea5e9
sky-600 #0284c7
sky-800 #075985
teal-600 #0d9488

1b. Accent (Emerald Β· Violet Β· Amber)

emerald-500
emerald-600
violet-600
violet-800
amber-500
amber-400

1c. Semantic (Triage + Status)

success #22c55e
warning #eab308
danger/red #dc2626
info #6366f1

1d. Neutral (Slate scale)

slate-50
slate-200
slate-400
slate-600
slate-800
slate-900

2. ✍️ Typography

2a. Font Stack

UI:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif
Mono:  "SF Mono", ui-monospace, Menlo, Consolas, monospace
       Used for: IDs (MRN, ENC), code, lab values, dose numbers

2b. Scale

TokenClassSizeUse
Displaytext-5xl font-bold3rem (48px)Hero headers
H1text-3xl md:text-4xl font-bold1.875-2.25remPage titles
H2text-2xl font-bold1.5remSection titles
H3text-lg font-bold1.125remSub-section
Bodytext-sm0.875remDefault content
Captiontext-xs0.75remMetadata, captions
Tinytext-[10px]10pxLabels, tags

3. 🚦 Triage Color System (CRITICAL)

3-warna triage = canonical sistem keseluruhan. Konsisten di semua module Β· accessibility-friendly Β· culturally familiar (traffic light).

🟒
HIJAU Β· Self-care
bg-emerald-50 text-emerald-900 border-emerald-300
🟑
KUNING Β· Klinik
bg-yellow-50 text-yellow-900 border-yellow-300
πŸ”΄
MERAH Β· ED/999
bg-red-50 text-red-900 border-red-300
{/* Triage badge component */}
<span class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold {triage-class}">
  <span class="w-2 h-2 rounded-full bg-current"></span>
  TRIAGE LEVEL
</span>

4. πŸ”˜ Buttons

{/* Primary */}
<button class="bg-sky-600 text-white hover:bg-sky-700 px-5 py-2.5 rounded-lg font-bold text-sm transition">
  Save Encounter
</button>

{/* Secondary */}
<button class="bg-white border-2 border-slate-300 text-slate-700 hover:bg-slate-50 px-5 py-2.5 rounded-lg font-medium text-sm">
  Cancel
</button>

{/* Danger */}
<button class="bg-red-600 text-white hover:bg-red-700 px-5 py-2.5 rounded-lg font-bold text-sm">
  Block Drug
</button>

{/* Success / HITL Approve */}
<button class="bg-emerald-600 text-white hover:bg-emerald-700 px-5 py-2.5 rounded-lg font-bold text-sm">
  βœ“ Approve
</button>

{/* Icon button */}
<button class="p-2 rounded-lg hover:bg-slate-100 text-slate-600">
  <svg class="w-5 h-5" .../>
</button>

{/* Sizes: xs Β· sm (default) Β· base Β· lg */}
.btn-xs { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

5. πŸƒ Cards

{/* Standard card */}
<div class="bg-white border border-slate-200 rounded-xl p-6 shadow-sm hover:shadow-md transition">
  <h3 class="text-lg font-bold text-slate-900 mb-2">Title</h3>
  <p class="text-sm text-slate-600">Content</p>
</div>

{/* Stats card (KPI dashboard) */}
<div class="bg-white border border-slate-200 rounded-xl p-4">
  <div class="text-xs text-slate-500 uppercase tracking-widest">Pesakit Hari Ni</div>
  <div class="text-3xl font-bold mono text-slate-900 mt-1">24</div>
  <div class="text-xs text-emerald-600 mt-1">↑ 12% vs semalam</div>
</div>

{/* Citation card (M9 hallucination guard) */}
<div class="bg-sky-50 border border-sky-200 rounded-lg p-3 text-xs">
  <div class="font-bold text-sky-900">πŸ“š Citation</div>
  <div class="text-slate-700 mt-1">MOH Headache CPG 2018, p. 23</div>
</div>

{/* HITL approval card */}
<div class="bg-amber-50 border-2 border-amber-300 rounded-xl p-4">
  <div class="flex items-center gap-2">
    <span class="text-amber-600">⚠️</span>
    <span class="font-bold text-amber-900">Approval Required</span>
  </div>
  <p class="text-sm text-slate-700 mt-2">{action description}</p>
  <div class="flex gap-2 mt-3">
    <button class="bg-emerald-600...">Approve</button>
    <button class="bg-red-600...">Reject</button>
    <button class="bg-slate-200...">Modify</button>
  </div>
</div>

6. πŸ“‹ Tables

<table class="w-full border-collapse text-sm">
  <thead>
    <tr>
      <th class="bg-slate-900 text-white text-left px-3 py-2 font-bold text-xs uppercase tracking-widest">Header</th>
    </tr>
  </thead>
  <tbody>
    <tr class="border-t border-slate-200 hover:bg-slate-50">
      <td class="px-3 py-2">Cell</td>
    </tr>
  </tbody>
</table>

{/* Patient queue table per Doc Zam mock */}
<tr class="border-t cursor-pointer hover:bg-emerald-50">
  <td class="px-3 py-2">
    <div class="flex items-center gap-3">
      <div class="w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center font-bold">A</div>
      <div>
        <div class="font-semibold">Pak Mat Bin Ali</div>
        <div class="text-xs text-slate-500">Waiting</div>
      </div>
    </div>
  </td>
  <td class="px-3 py-2 text-right mono">10:30</td>
</tr>

7. πŸ“ Forms

{/* Input field per Doc Zam mock */}
<div class="mb-4">
  <label class="block text-sm font-semibold text-slate-700 mb-1">
    Medical Record Number <span class="text-red-500">*</span>
  </label>
  <input
    type="text"
    placeholder="MRN-2026-001245"
    class="w-full px-3 py-2 border border-slate-300 rounded-lg
           focus:border-sky-500 focus:ring-2 focus:ring-sky-200 outline-none"
  />
  <div class="text-xs text-slate-500 mt-1">Format: YYYY-NNNNNN</div>
</div>

{/* Select */}
<select class="w-full px-3 py-2 border border-slate-300 rounded-lg
               focus:border-sky-500 focus:ring-2 focus:ring-sky-200 outline-none bg-white">
  <option>Pilih...</option>
  <option>Lelaki</option>
  <option>Perempuan</option>
</select>

{/* Checkbox + label */}
<label class="flex items-start gap-2 cursor-pointer">
  <input type="checkbox" class="mt-1 w-4 h-4 text-sky-600 rounded border-slate-300"/>
  <span class="text-sm text-slate-700">
    Saya bersetuju treatment ini Β· <a href="#" class="text-sky-600 underline">Terma</a>
  </span>
</label>

{/* Validation states */}
.input-error { border-color: #dc2626; ring: 2px ring-red-200; }
.input-success { border-color: #059669; ring: 2px ring-emerald-200; }

8. 🚨 Alerts

{/* Info */}
<div class="bg-sky-50 border border-sky-200 rounded-lg p-3 text-sm">
  <div class="flex gap-2">
    <span class="text-sky-600">ℹ️</span>
    <p class="text-sky-900">Briefing packet has been refreshed.</p>
  </div>
</div>

{/* Success */}
<div class="bg-emerald-50 border border-emerald-200 rounded-lg p-3 text-sm">
  <p class="text-emerald-900 font-semibold">βœ“ Encounter signed-off successfully</p>
</div>

{/* Warning */}
<div class="bg-amber-50 border border-amber-200 rounded-lg p-3 text-sm">
  <p class="text-amber-900 font-semibold">⚠️ DDI MAJOR detected · pharmacist review required</p>
</div>

{/* Danger / Red flag */}
<div class="bg-red-50 border-2 border-red-300 rounded-lg p-4 text-sm">
  <div class="flex items-center gap-2 mb-2">
    <span class="text-red-600 text-2xl">⚠️</span>
    <p class="text-red-900 font-bold text-lg">RED FLAG Β· Possible cardiac event</p>
  </div>
  <p class="text-red-800">Telefon 999 SEKARANG. Jangan pandu sendiri.</p>
  <div class="flex gap-2 mt-3">
    <a href="tel:999" class="bg-red-600 text-white px-4 py-2 rounded-lg font-bold">πŸ“ž Call 999</a>
  </div>
</div>

9. 🏷️ Triage Badge

<span class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold
             bg-emerald-100 text-emerald-800 border border-emerald-200">
  <span class="w-2 h-2 rounded-full bg-emerald-500"></span>
  HIJAU
</span>

<span class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold
             bg-yellow-100 text-yellow-800 border border-yellow-200">
  <span class="w-2 h-2 rounded-full bg-yellow-500"></span>
  KUNING
</span>

<span class="inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold
             bg-red-100 text-red-800 border border-red-200 animate-pulse">
  <span class="w-2 h-2 rounded-full bg-red-500"></span>
  MERAH
</span>

10. πŸ’¬ Chat Bubbles (Patient PA)

{/* AI message (left) */}
<div class="flex gap-2 mb-3">
  <div class="w-8 h-8 rounded-full bg-emerald-600 text-white flex items-center justify-center text-sm flex-shrink-0">πŸ€–</div>
  <div class="bg-white rounded-2xl rounded-tl-sm px-3 py-2 max-w-[75%] shadow text-sm">
    Hai! Boleh ko ceritakan simptom?
  </div>
</div>

{/* Patient message (right) */}
<div class="flex gap-2 justify-end mb-3">
  <div class="bg-sky-600 text-white rounded-2xl rounded-tr-sm px-3 py-2 max-w-[75%] shadow text-sm">
    Sakit kepala 3 hari
  </div>
  <div class="w-8 h-8 rounded-full bg-slate-600 text-white flex items-center justify-center text-sm flex-shrink-0">πŸ‘€</div>
</div>

{/* Citation meta */}
<div class="ml-10 text-[11px] text-slate-500 italic mt-1">
  πŸ“š MOH Headache CPG 2018
</div>

11. πŸŽ›οΈ Filament 3 Theme Customization

// app/Providers/Filament/AdminPanelProvider.php
public function panel(Panel $panel): Panel
{
    return $panel
        ->id('admin')
        ->path('/admin')
        ->login()
        ->colors([
            'primary' => Color::Sky,        // sky-600 #0284c7
            'success' => Color::Emerald,
            'warning' => Color::Amber,
            'danger'  => Color::Red,
            'info'    => Color::Indigo,
            'gray'    => Color::Slate,
        ])
        ->font('Inter')
        ->brandName('MediEco Β· Admin')
        ->brandLogo(asset('images/logo.svg'))
        ->darkMode(false)  // Phase 1: light only Β· dark Phase 3
        ->sidebarCollapsibleOnDesktop()
        ->maxContentWidth('full')
        ->widgets([...])
        ->pages([...])
        ->resources([...]);
}

12. πŸ“± Mobile / PWA

  • Mobile-first breakpoints: 360 β†’ 768 β†’ 1024 β†’ 1440 β†’ 1920
  • Tap target β‰₯44Γ—44px (Apple HIG Β· Material guideline)
  • Bottom navigation pattern untuk Patient PWA (4 tabs: Home Β· Symptom Β· History Β· Profile)
  • Pull-to-refresh native (PWA + Service Worker)
  • Push notification opt-in pada onboarding
  • "Add to Home Screen" prompt selepas 3 sessions
  • Offline indicator banner (orange) Β· queue actions for sync
  • Reduced motion respect (prefers-reduced-motion)
{/* manifest.json */}
{
  "name": "MediEco Patient",
  "short_name": "MediEco",
  "start_url": "/",
  "display": "standalone",
  "theme_color": "#0284c7",
  "background_color": "#f8fafc",
  "icons": [...]
}

13. β™Ώ Accessibility (WCAG 2.1 AA)

  • Color contrast β‰₯4.5:1 normal text Β· β‰₯3:1 large text Β· verified axe-core
  • Keyboard navigation full Β· Tab order logical Β· focus rings visible
  • Screen reader labels: aria-label Β· aria-live Β· aria-describedby
  • Triage colors NEVER sole indicator β€” always paired with icon + text
  • Form errors: aria-invalid Β· descriptive error message Β· non-color marker (icon)
  • Alt text untuk semua images (clinical Β· UI)
  • Skip-to-content link Β· semantic HTML (nav/main/article)
  • Respect prefers-color-scheme Β· prefers-reduced-motion

14. 🧱 Layout Patterns (per Doc Zam mock)

14a. 6-Tab Quick Access (M4 Doctor)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Encounter ID: ENC-2026-0425-001                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 6 tabs   β”‚ Active tab content                    β”‚
β”‚          β”‚                                       β”‚
β”‚ 1.Profileβ”‚ {Patient Profile / History / RX /...} β”‚
β”‚ 2.Historyβ”‚                                       β”‚
β”‚ 3.Rx     β”‚                                       β”‚
β”‚ 4.Lab    β”‚                                       β”‚
β”‚ 5.Image  β”‚                                       β”‚
β”‚ 6.Bill   β”‚                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

14b. 3-Column Operations View (M7 Admin)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Reception   β”‚ Doctor      β”‚ Pharmacy    β”‚
β”‚ ACTIVE      β”‚ ACTIVE      β”‚ ACTIVE      β”‚
β”‚             β”‚             β”‚             β”‚
β”‚ β€’ Search    β”‚ β€’ Chief     β”‚ β€’ Verify    β”‚
β”‚ β€’ Demo      β”‚ β€’ Vitals    β”‚ β€’ Stock     β”‚
β”‚ β€’ Insurance β”‚ β€’ Diagnosis β”‚ β€’ Dispense  β”‚
β”‚             β”‚             β”‚             β”‚
β”‚ Today: 12   β”‚ 24/15/9     β”‚ 8 ready     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

14c. Patient Profile Form (11 sections grid)

β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚  1   β”‚  4   β”‚  8   β”‚
β”‚ Mast β”‚ PCP  β”‚ Med  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚  2   β”‚  5   β”‚  9   β”‚
β”‚ Cont β”‚ Ins  β”‚ Vit  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚  3   β”‚  6   β”‚ 10   β”‚
β”‚ Emer β”‚ Snap β”‚ Hist β”‚
β”‚      β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚      β”‚  7   β”‚ 11   β”‚
β”‚      β”‚ Allg β”‚ Care β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜
3-column responsive grid Β· sections collapsible Β· highlight on focus