Busflow Docs

Internal documentation portal

Skip to content

@busflow/config-tailwind ​

Global design tokens for the busflow design system. All consuming apps extend this base Tailwind configuration to inherit brand colors, typography, spacing, shadows, and transitions.

This package is the single source of truth for visual consistency across all six busflow applications.

Design Principles ​

  1. Pragmatic β€” Every token solves a real problem. No decorative complexity.
  2. Sovereign β€” Enterprise-grade stability. Predictable, robust interactions.
  3. Seamless β€” Everything flows. No visual breaks between booking, dispatch, and driver.
  4. Generous Whitespace β€” Reduce perceived complexity. Let content breathe.
  5. Mobile-First β€” Driver PWA on a phone is as important as the dispatcher's 27" monitor.

Visual Identity ​

"Consumer-Grade" B2B identity replacing legacy "Windows-95-Charme" UIs:

  • Primary: Tiefes Navy Blue / Asphalt-Schwarz β€” Enterprise-Sicherheit, SeriositΓ€t.
  • Accent: Elektrisierendes β€žFlow Mint" / Neon Cyan β€” KI, Geschwindigkeit, Digitalisierung.
  • Whitespace: GroßzΓΌgig β€” reduziert gefΓΌhlte KomplexitΓ€t.
  • Typografie: Clean, modern, sans-serif (Inter). Lesbar auf mobilen Displays und großen Dashboards.
  • Bildsprache: Cleane UI-Mockups (Dark/Light Mode), dynamische Makroaufnahmen. Keine Stock-Fotos.

Reference Documents ​

  • [project-scope.md](file:///Users/julianbruning/Projekte/busflow/busflow/docs/2-areas/product/PRODUCT_project-scope.md) β€” Brand positioning, messaging
  • [frontend-architecture.md](file:///Users/julianbruning/Projekte/busflow/busflow/docs/2-areas/architecture/frontend.md) β€” Package boundaries, constraints
  • [guidelines.md](file:///Users/julianbruning/Projekte/busflow/busflow/docs/2-areas/process/guidelines.md) β€” Documentation standards

Color System ​

Primary Palette ​

TokenRoleValueRationale
primaryNavy / Asphalt β€” enterprise trust#1A2B3D"Enterprise-Sicherheit und SeriositΓ€t"
primary-darkDeep backgrounds (CTA sections)#1B2F4BDark-mode surfaces, CTA backgrounds
accentFlow Mint β€” action, AI, speed#2E8B6E"KI, Geschwindigkeit, Digitalisierung"
accent-hoverAccent interaction state#257558Darkened accent for hover/active
accent-lightAccent tint for backgrounds#E8F5EFSubtle highlight behind accent elements
accent-warmWarm CTA β€” urgency, conversion#E07C4ASecondary action color for conversion flows
accent-warm-lightWarm tint background#FFF3EDβ€”

Background Surfaces ​

TokenValueUsage
bg-primary#FFFFFFDefault page background
bg-surface-elevated#F0F4F3Hero and feature sections
bg-surface-sunken#FAFBFAAlternating content sections
bg-muted#F5F5F0De-emphasized areas
bg-brand#1B2F4BDark CTA blocks
bg-card#FFFFFFCard surfaces

Text Hierarchy ​

TokenValueUsage
text-primary#1A2B3DHeadings and body text
text-secondary#4A5B6DSubtitles, descriptions
text-muted#7A8A99Captions, helper text
text-inverse#FFFFFFText on dark backgrounds
text-inverse-mutedrgba(255,255,255,0.7)Secondary text on dark backgrounds

Semantic Colors ​

TokenValueUsage
success#2E8B6EConfirmations, positive states
danger#C65D4AErrors, destructive actions
warningTBDWarnings, attention-needed states
infoTBDInformational feedback

Borders ​

TokenValueUsage
border#E5E7EBDefault borders (inputs, cards)
border-light#F0F1F3Subtle separators

Dark Mode (Future) ​

Strategy for app-admin dark theme:

  • Token names stay; values switch via CSS custom properties or Tailwind dark: variants
  • Primary/accent hues stay consistent; luminance inverts
  • To be specified when app-admin theming is implemented

Theme Scopes ​

For the architectural reasoning behind this system, see design-system architecture.

CSS variables are scoped to .theme-* classes (not just :root), enabling context-aware theming at the layout/router level:

css
@layer base {
  :root {
    --background: 0 0% 100%;
    --primary: 222.2 47.4% 11.2%; /* Navy */
    --radius: 0.25rem;
  }

  .theme-passenger {
    --background: 48 33% 97%;     /* Alabaster */
    --primary: 153 37% 16%;       /* Forest Green */
    --radius: 0.5rem;             /* Soft */
  }

  .theme-dispatcher {
    --background: 210 40% 98%;    /* Slate off-white */
    --primary: 222.2 47.4% 11.2%; /* Deep Navy */
    --radius: 0.25rem;            /* Sharp */
  }

  .theme-driver {
    --background: 222 47% 5%;     /* Off-black */
    --primary: 217 91% 60%;       /* High-vis Blue */
    --radius: 0.375rem;           /* Tactile */
  }
}

Scope Comparison ​

Element.theme-passenger.theme-dispatcher.theme-driver
BackgroundAlabaster (#F9F7F1)Slate off-whiteOff-black
PrimaryForest Green (#1B3B2E)Deep NavyHigh-vis Blue
BordersSoft Stone, 8px radiusSlate, 4px radiusRugged Gray, 6px radius
Shadowsshadow-soft-warmMinimal shadow-smNone static; shadow-tactile on buttons
Transitionsease-in-out 300msSnappy 150msSnappy 150ms

Typography ​

Font stack: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif

Per branding: "Clean, modern, sans-serif … auf mobilen Fahrer-Displays genauso gut lesbar wie auf dem großen Dashboard."

Size Scale ​

TokenValueUsage
text-xs0.8125rem (13px)Labels, badges, overlines
text-sm0.9375rem (15px)Secondary body, captions
text-base1.0625rem (17px)Default body text
text-lg1.1875rem (19px)Subtitles, section descriptions
text-xl1.375rem (22px)Card headings
text-2xl1.75rem (28px)Section headings
text-3xl2.25rem (36px)Page section titles
text-4xl2.875rem (46px)Hero secondary
text-5xl3.5rem (56px)Hero primary

Responsive overrides (≀768px): text-5xl β†’ 2.5rem, text-4xl β†’ 2rem, text-3xl β†’ 1.75rem

Weight Usage ​

WeightUsage
400Body text
500UI labels, navigation
600Buttons, section labels
700Inverse buttons, strong emphasis
800Section titles, hero headings

Line Heights ​

ContextValue
Body text1.7
Headings1.2
UI elements1.4

Spacing Scale ​

TokenValueUsage
space-xs0.25rem (4px)Inline gaps, icon padding
space-sm0.5rem (8px)Tight element spacing
space-md1rem (16px)Default component spacing
space-lg1.5rem (24px)Section label-to-title gap
space-xl2rem (32px)Container horizontal padding
space-2xl3rem (48px)Component group spacing
space-3xl4rem (64px)Between-section padding (mobile)
space-4xl5rem (80px)Section vertical padding (mobile)
space-5xl7rem (112px)Section vertical padding (desktop)

Border Radii ​

TokenValueUsage
radius-sm6pxChips, tags
radius-md10pxButtons, inputs, cards
radius-lg14pxModals, large cards
radius-xl20pxFeature panels
radius-full9999pxPills, avatars, badges

Shadows ​

TokenValueUsage
shadow-xs0 1px 2px rgba(0,0,0,0.04)Inputs at rest
shadow-sm0 2px 8px rgba(0,0,0,0.06)Raised elements
shadow-md0 4px 20px rgba(0,0,0,0.08)Cards, dropdowns
shadow-lg0 8px 40px rgba(0,0,0,0.10)Modals, overlays
shadow-card0 1px 3px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.06)Multi-layer card depth

Transitions ​

TokenValueUsage
transition-fast150ms easeMicro-interactions (hover color)
transition-base250ms easeStandard interactions (button press)
transition-slow400ms cubic-bezier(0.16,1,0.3,1)Entrance animations

Getting Started ​

1. Add the dependency ​

json
// apps/<app-name>/package.json
{
  "dependencies": {
    "@busflow/config-tailwind": "workspace:*"
  }
}

2. Import the theme (Tailwind v4) ​

In your app's main CSS file, import the theme before Tailwind:

css
@import "@busflow/config-tailwind/theme";
@import "tailwindcss";

This makes all busflow tokens available as Tailwind utilities (e.g., bg-accent, text-primary, rounded-lg, shadow-card).

3. Load the Inter font ​

Add the Google Fonts link to your app's HTML head:

html
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />

Token Preview ​

A built-in visual token viewer replaces tailwind-config-viewer (which doesn't support Tailwind v4). Run:

bash
# From monorepo root
pnpm dev:tokens

# Or from the package directory
pnpm preview

Opens http://localhost:3333 with a live preview of all colors, typography, spacing, shadows, radii, buttons, and animations β€” using the actual theme tokens.


Migration Note ​

apps/landing/src/style.css contains CSS custom properties (:root variables) as interim tokens. When migrating:

  1. Replace :root variables with Tailwind utility classes from this package
  2. Custom button classes (.btn--*) β†’ Button component from ui-core
  3. Layout classes (.container, .section) β†’ equivalent Tailwind utilities or components

Internal documentation β€” Busflow