W

Web App Style Guide

Vue 3 + Vite + Tailwind CSS v4 · Light theme

Visual reference for the TrainerDay web app (trainerday.com). All tokens come from src/assets/css/tailwind.css.

Design Tokens

Primitive values that define the visual language: colors, typography, spacing, and radii.

Colors

Primary

Primary #2563eb
Primary Light #dbeafe
Primary Dark #1d4ed8

Semantic

Success #10b981
Danger #e7140f
Warning #eab308
Info #4ea1fe

Surfaces

Surface #f6f8fb
Card #ffffff
Sidebar #1e293b

Text

Text #1a202c
Text Muted #64748b
Text Light #94a3b8

Training Zones

Recovery #7f7f7f
Endurance #3f8fce
Tempo #49c072
Threshold #ffcc3f
VO2max #f46d41
Anaerobic #d6270b

Periodization

Base #02c9af
Build #ffba4a
Peak #f86f2b
Event #1a9af6

Typography

DM Sans — App Font

The quick brown fox jumps over the lazy dog


Heading 1 (text-3xl font-bold)

Heading 2 (text-2xl font-bold)

Heading 3 (text-xl font-semibold)

Heading 4 (text-lg font-semibold)

Body text (text-base)

Muted text (text-sm text-text-muted)

Light small text (text-xs text-text-light)


Heading Utilities

Heading .td-h2 (1.5rem / 700)

Heading .td-h3 (1.25rem / 700)

Heading .td-h4 (1.125rem / 700)

Border Radius

rounded-sm
6px
rounded-md
12px
rounded-lg
16px
rounded-pill
100px

Components

Reusable UI elements built from design tokens.

Buttons

Button Tiers

Small Variants .is-small

Disabled State

Loading State

Ghost / Link Buttons

Minimal-weight actions that look like text. Use for navigation-style actions or "Learn more" links.

Cards

.td-card — Standard card (white bg, 12px radius, border, subtle shadow, 16px padding)

Card Title

Content inside .td-card. The primary container pattern for app sections.

.td-base-card — Simpler card (no shadow)

Base Card Title

Content inside .td-base-card. Same as td-card but without box-shadow.

Recommended

Builder Card (Selected)

Featured card with blue ring and badge. Based on Coach Jack's plan builder pattern.

  • ✓ Feature one
  • ✓ Feature two
  • ✓ Feature three

Training Zones Card

Recovery < 55%
Endurance 55-75%
Tempo 76-90%
Threshold 91-105%
VO2max 106-120%
Anaerobic > 120%

Interactive Card

Hover to see the border and shadow effect. Used for clickable cards.

Learn more →
Weekly TSS

342

▲ 12% from last week

Form Inputs

Updated — 2026-04-19 All form controls now use the fully-rounded pill shape (border-radius: 100px) to match buttons. Horizontal padding bumped to 18px so text doesn't crowd the rounded ends. Focus / error / disabled visuals unchanged.

Applies to text, email, number, password, search, select, and textarea inputs. Textareas keep a softer 20px radius since a pill on a multi-line box looks wrong.

Your Functional Threshold Power

This field is required

Supports vertical resize

Segmented Tabs

iOS-style segmented control. Container has surface bg + border. Active tab: white bg + subtle shadow. Inactive: muted text.

2 options
3 options
Compact

Badges

Zone Badges .dominant-zone

Recovery Endurance Tempo Threshold VO2max Anaerobic

Pill Badges

Primary Success Endurance Tempo Threshold VO2max Anaerobic Base Phase Build Phase Peak Phase

Split Pill (Label + Value)

Pill with a gray label section on the left and a bold value on the right. Clickable variant gets hover:border-primary.

Event Date Mar 22, 2026
Block Hours 6 – 9h
Duration 16 weeks

Readout Pill

New — 2026-04-19 Pill-shaped container with a small uppercase label floating in a notch on the top border, and one or more label/value columns inside separated by thin vertical dividers.

When to use: Contextual readouts that summarize the currently selected, focused, or active item — the selected row in a data grid, the active interval in a workout, the currently highlighted segment on a chart. Not for static KPIs (use a card) or primary metrics (use large numeric type).

Variants

Watts 245
Watts 125
Zone Z1
Watts 245
FTP% 98
Zone Z5

Anatomy

  • Outer pill — 1px border, fully rounded, 40px height, white background.
  • Top-notch label — 9px uppercase, tracked, muted color; white background overlaps the border (rendered via ::before + data-label).
  • Each column — small uppercase label + bold tabular-numeric value (or a colored badge).
  • Dividers — 1px × 18px, centered vertically between columns.

HTML reference

<div class="td-readout-pill" data-label="Selected row">
  <div class="td-readout-col">
    <span class="td-readout-label">Watts</span>
    <span class="td-readout-value">125</span>
  </div>
  <div class="td-readout-divider"></div>
  <div class="td-readout-col">
    <span class="td-readout-label">Zone</span>
    <span class="td-readout-badge" style="background:#7F7F7F;color:#fff">Z1</span>
  </div>
</div>

Do / Don't

  • ✓ Use near the thing it describes (above a grid, next to a chart).
  • ✓ Keep total width modest — it's a readout, not a dashboard.
  • ✗ Don't use for static facts or headers.
  • ✗ Don't stack multiple readout pills in a row — pick the one that matters.
  • ✗ Don't put interactive elements inside it — it's a display component.

Alerts

ⓘ

Info

Your training plan has been updated with the latest changes.

✓

Success

Your workout has been saved to the calendar.

⚠

Warning

Your FTP has not been updated in over 8 weeks. Consider retesting.

⚠

Error

Could not connect to the server. Please try again.

Tabs

Underline Tabs

Active tab: primary color + 2px bottom border. Uppercase, bold, tracking-wide.

Pill Tabs

Active = primary-light bg + primary text. Inactive = no bg.

Toggles / Switches

40x22px pill track with 16px circle thumb. Primary blue for ON state.

ON
OFF
Disabled

Two-State Toggle (Label Pair)

Week Plan
Event Plan

Table

Week Phase Hours TSS Zone
1 Base 6.5h 285 Endurance
2 Base 7.0h 310 Tempo
3 Build 8.0h 380 Threshold
4 Peak 5.5h 420 VO2max