Best For
vertical timeline / timeline layout / timeline ui
垂直时间线布局
Rate this styleVertical timeline layout connecting time nodes through a connecting line. Ideal for displaying historical progress, project milestones, work experience, and process steps.
Best For
vertical timeline / timeline layout / timeline ui
Primary Move
Use pseudo-elements or divs to create the central connecting line
Watch Out
Do not break or misalign the connecting line
design.md
One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.
One continuous line with time pinned to it — alternating sides, rhythm set by the nodes.
Theme: light
A vertical timeline turns sequence into vertical position: a 2px connector runs down the centre with nodes ordered in time, alternating left and right on desktop and collapsing to one side on mobile. Three rules hold it together — the line never breaks, node sizes never vary, and mobile abandons the alternation entirely. The line stays weak (slate at 25%) so nodes and cards carry attention; hovering a node scales its ring and fills it with the primary while the card lifts, and the two must move together rather than the card alone.
| Name | Value | Token | Role |
|---|---|---|---|
| Slate | #1e293b | --color-slate | Headings and primary text — the connector uses the same tone at just 25% opacity. |
| Haze | #f8fafc | --color-haze | Page ground and alternating sections, giving white cards something to lift from. |
| Primary Blue | #3b82f6 | --color-primary-blue | The current node, primary buttons and links — the timeline's 'you are here'. |
| Done Green | #10b981 | --color-done-green | Past nodes and completed milestones. |
| Pending Amber | #f59e0b | --color-pending-amber | Upcoming nodes and those needing attention. |
| Alert Red | #ef4444 | --color-alert-red | Delayed and failed nodes — its presence marks a break in the sequence. |
| Role | Family | Weight | Size | Line Height | Letter Spacing | Token |
|---|---|---|---|---|---|---|
| display | — | 700 | 28px | 1.2 | -0.01em | --text-display |
| heading | — | 600 | 22px | 1.3 | — | --text-heading |
| subheading | — | 600 | 18px | 1.35 | — | --text-subheading |
| body-lg | — | 500 | 15px | 1.5 | — | --text-body-lg |
| body | — | 400 | 13px | 1.55 | — | --text-body |
| label | — | 600 | 12px | 1.4 | 0.06em | --text-label |
Base unit: 8px Density: comfortable
| Name | Value | Token |
|---|---|---|
| 8 | 8px | --spacing-8 |
| 16 | 16px | --spacing-16 |
| 24 | 24px | --spacing-24 |
| 32 | 32px | --spacing-32 |
| 48 | 48px | --spacing-48 |
| 64 | 64px | --spacing-64 |
| 96 | 96px | --spacing-96 |
| Element | Value |
|---|---|
| cards | 12px |
| buttons | 8px |
| nodes | 999px |
Role: The node ring on the line
A 20px circle with a 2px slate border at 30% on white, aligned to the connector. The current node fills primary and carries a 4px ring at 20%; past nodes fill done green; upcoming nodes stay white. Hover scales the ring to 1.25 and fills it primary, in lockstep with the card, which lifts 2px. 150ms.
Role: The node card
White fill, 12px radius, a 1px #e2e8f0 border, 24px padding, shadow 0 2px 8px. The card fills its column and sits 24px from the node. A 12px uppercase time label in grey sits above an 18px/600 title and 13px body. Hover lifts 2px and widens the shadow to 24px.
Role: The centre connector
2px wide in slate at 25%, running down the centre from the first node to the last via pseudo elements, never breaking. If two nodes sit more than 96px apart, the content is too long — split it rather than stretch the line.
Role: Time filters
A row of pill buttons, 32px tall, 0 14px padding at 12px/600. Default is a white fill with a 1px border; selection fills primary with white text. They filter nodes by year or phase, and switching staggers the node list in over 200ms.
| Level | Name | Value | Purpose |
|---|---|---|---|
| 0 | Haze | #f8fafc | 页面底 |
| 1 | Card White | #ffffff | 节点卡片 |
0 2px 8px rgba(15,23,42,0.06)0 8px 24px rgba(15,23,42,0.10)0 0 0 4px rgba(59,130,246,0.20)Icons and avatars lead, with an optional 16:10 thumbnail per node. No full-bleed backgrounds — the timeline needs a clean vertical channel.
Capped at 960px. Desktop uses a centre line with alternating sides at 44% each and a 12% gap, with each node on the card's inner edge. Mobile collapses to a single left-aligned column with the line at 16px from the edge. Nodes sit at least 48px apart and never more than 96px.
QUICK COLOR REFERENCE:
#1e293b#f8fafc#ffffff#3b82f6#10b981#e2e8f0EXAMPLE COMPONENT PROMPTS:
:root {
/* Colors */
--color-slate: #1e293b;
--color-haze: #f8fafc;
--color-primary-blue: #3b82f6;
--color-done-green: #10b981;
--color-pending-amber: #f59e0b;
--color-alert-red: #ef4444;
/* Typography — Font Families */
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
/* Typography — Scale */
--text-display: 28px;
--leading-display: 1.2;
--tracking-display: -0.01em;
--text-heading: 22px;
--leading-heading: 1.3;
--text-subheading: 18px;
--leading-subheading: 1.35;
--text-body-lg: 15px;
--leading-body-lg: 1.5;
--text-body: 13px;
--leading-body: 1.55;
--text-label: 12px;
--leading-label: 1.4;
--tracking-label: 0.06em;
/* Typography — Weights */
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;
/* Spacing */
--spacing-unit: 8px;
--spacing-8: 8px;
--spacing-16: 16px;
--spacing-24: 24px;
--spacing-32: 32px;
--spacing-48: 48px;
--spacing-64: 64px;
--spacing-96: 96px;
/* Layout */
--page-max-width: 960px;
--section-gap: 48px;
--card-padding: 24px;
--element-gap: 16px;
--density: comfortable;
/* Border Radius */
--radius-cards: 12px;
--radius-buttons: 8px;
--radius-nodes: 999px;
/* Surfaces */
--surface-haze: #f8fafc;
--surface-card-white: #ffffff;
}
Component Templates
FAQ
/* Vertical Timeline Global Styles */
/* Timeline container */
.timeline {
position: relative;
padding-left: 2rem;
}
/* Central line */
.timeline::before {
content: '';
position: absolute;
left: 0.5rem;
top: 0;
bottom: 0;
width: 2px;
background: #e2e8f0;
}
/* Timeline item */
.timeline-item {
position: relative;
padding-left: 2rem;
padding-bottom: 2rem;
}
/* Node dot */
.timeline-item::before {
content: '';
position: absolute;
left: -0.5rem;
top: 0.5rem;
width: 1rem;
height: 1rem;
border-radius: 50%;
background: #3b82f6;
border: 4px solid white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Alternating layout for desktop */
@media (min-width: 768px) {
.timeline-alternating {
padding-left: 0;
}
.timeline-alternating::before {
left: 50%;
transform: translateX(-50%);
}
.timeline-alternating .timeline-item {
width: 50%;
padding-left: 0;
padding-right: 2rem;
}
.timeline-alternating .timeline-item:nth-child(even) {
margin-left: 50%;
padding-left: 2rem;
padding-right: 0;
}
.timeline-alternating .timeline-item::before {
left: auto;
right: -0.5rem;
}
.timeline-alternating .timeline-item:nth-child(even)::before {
left: -0.5rem;
right: auto;
}
}
/* Scroll animation */
.timeline-item {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.in-view {
opacity: 1;
transform: translateY(0);
}
/* Node color variants */
.timeline-item[data-status="complete"]::before {
background: #10b981;
}
.timeline-item[data-status="current"]::before {
background: #3b82f6;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.timeline-item[data-status="upcoming"]::before {
background: #d1d5db;
}
/* Vertical Timeline Design Tokens */
:root {
--timeline-vertical-primary: #1e293b;
--timeline-vertical-secondary: #f8fafc;
--timeline-vertical-accent: #3b82f6;
--timeline-vertical-glow: rgba(30, 41, 59, 0.3);
}
@keyframes timeline-vertical-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes timeline-vertical-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.timeline-vertical-gradient {
background: linear-gradient(135deg, #1e293b, #3b82f6);
}
.timeline-vertical-gradient-text {
background: linear-gradient(135deg, #1e293b, #3b82f6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.timeline-vertical-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(30, 41, 59, 0.08);
}
.timeline-vertical-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.timeline-vertical-animate-in {
animation: timeline-vertical-fade-in 0.5s ease-out both;
}Compatible Visual Styles
Vertical Timeline is a layout pattern that can be paired with the following visual styles.
Related Styles
Explore these styles for ready-made tokens and components.
Vertical Timeline and Apple Style sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.
| Attribute | Vertical Timeline | Apple Style |
|---|---|---|
| Primary color | #1e293b | #000000 |
| Secondary color | #f8fafc | #f5f5f7 |
| Best for | vertical timeline / timeline layout / timeline ui | Apple style / Apple design / minimalist website |
| Unique tags | — | — |
Vertical Timeline is a layout approach for displaying time sequences or process steps, guiding reading through visual connecting lines.
Design Recipes
These curated recipes combine this style with layouts and animations, optimized for specific use cases.