Internal — Dev Only

DriveLedger Brand System

The single source of truth for colours, typography, spacing, motion and reusable components. Every new screen should be assembled from what's documented here.

Colours

Semantic colour tokens defined in src/index.css. Never hardcode hex values — always consume the mapped Tailwind class (e.g. bg-primary).

Aa
background
Aa
foreground
Aa
primary
Aa
secondary
Aa
muted
Aa
accent
Aa
destructive
Aa
card
Aa
border

Typography

Full type scale, mapped in tailwind.config.js. Body copy uses a slightly darker foreground token for improved readability contrast.

Displaytext-display
Heading 1text-h1
Heading 2text-h2
Heading 3text-h3
Heading 4text-h4
Body Largetext-body-lg
Bodytext-body
Smalltext-small
Captiontext-caption

Spacing

8px grid system. Tailwind's default spacing scale already maps 1-to-1 to our grid — always use these scale numbers (p-4, gap-6, etc.), never arbitrary pixel values.

p-1
4px
p-2
8px
p-4
16px
p-6
24px
p-8
32px
p-12
48px
p-16
64px
p-24
96px

Shadows & Radius

Elevation and corner-rounding tokens, kept subtle to preserve the calm, premium aesthetic.

shadow-soft
shadow-medium
shadow-large
sm
md
lg
full

Motion

Minimal, consistent motion. Button/card hovers use duration-base (200ms), fade-ins use 250-350ms, modals/drawers use 250ms — all with the standard ease-out curve.

Button hover — 150-200ms
Card hover — 200ms
Hover this card
  • Fade-in sections: 250–350ms, ease-out, translate-y-2 → 0
  • Modals: 250ms scale + fade
  • Drawers: 250ms slide + fade
  • No bounce, no large movement — motion should feel calm

Buttons & Forms

Four-variant button system, plus standardized form fields with visible labels and focus states.

Cards, Badges & Alerts

Standard containers for grouping content and surfacing status.

Card title

Cards use bg-card, rounded-lg and shadow-soft by default.

Default
Secondary
Outline
Destructive

Quality Gate

Every component passes through this checklist before it is considered complete and merged.

Component Acceptance Checklist

  • Uses design tokens only — no hardcoded colours, spacing or typography
  • Mobile responsive across all breakpoints
  • Keyboard accessible with visible focus states
  • Screen-reader compatible (semantic HTML, labels, alt text)
  • Reusable — not a one-off, single-page component
  • Documented in this Brand System page
  • Performance tested (no layout shift, lightweight)
  • Supports future extension without modification

Performance Checklist

  • Mobile-first responsive
  • Accessible — WCAG 2.1 AA compliant
  • Dark mode compatible
  • Lighthouse target: Performance 95+, Accessibility/Best Practices/SEO 100
  • SEO friendly, semantic HTML
  • Optimised for Core Web Vitals