webdevpuneet.com

CSS View Timeline Stagger List — Scroll Timeline, No JS

CSS View Timeline Stagger List Items · Scroll · Plain HTML, CSS & JS · Live preview

About this UI Snippet

CSS View Timeline Stagger List Items — A Process Timeline Built Only From Scroll-Driven CSS

Screenshot of the CSS View Timeline Stagger List Items snippet rendered live

This snippet is a "From brief to launch" process timeline with six steps on a vertical rail. As you scroll, each step's card slides in from its side of the rail and sharpens out of a blur. Inside the card the icon and step number, the title, the text and the tags arrive one after another. The card glows while it crosses the middle of the screen, the step's dot lights up and gets a tick once you have passed it, and the rail fills behind you with its tip always at the middle of the screen. Scroll back up and every tick comes off again. There is no JavaScript at all: every effect is a CSS scroll-driven animation.

One named view timeline per step

Each .vsl-step declares view-timeline: --step block. A named view timeline is visible to the element's descendants, so the card, every child inside the card, the dot and the dot's ::after tick can all use animation-timeline: --step and read the same step's progress through the viewport. Each one then picks its own slice of that progress with animation-range.

A real stagger, from ranges on one timeline

The card's four children use one keyframe (vsl-child, a fade and a small rise) with ranges that start ten points apart: entry 15% entry 65%, entry 25% entry 75%, entry 35% entry 85% and entry 45% entry 100%. Because they share the step's timeline, they always arrive in the same order and spacing no matter how fast you scroll, which is exactly what a stagger is. No delays, no --i index variables and no script.

Entry, focus and done, from named ranges

The card's slide-in runs over entry 0% entry 90%, the part of the scroll where the step is coming into view. Its glow runs over cover 25% cover 75% with a keyframe that peaks at 50%, and cover 50% is the moment the step's centre lines up with the viewport's centre, so the brightest point is always the middle of the screen. The dot changes over cover 44% cover 52% and the tick over cover 48% cover 54%. With animation-fill-mode: both, a view-timeline animation keeps its end state after its range, so a passed step stays ticked, and keeps its start state before, so a step you have not reached yet stays empty.

A rail that tracks the middle of the screen

The whole list sits in .vsl-track, which declares its own --track timeline. The rail fill scales from 0 to 1 over cover 50vh cover calc(100% - 50vh). The cover range starts when the track's top reaches the bottom of the viewport, so 50vh later its top is at the middle; it ends when the track's bottom leaves the top, so 50vh earlier its bottom is at the middle. Between those points the fill's tip stays on the middle of the screen, which lines it up with the dots lighting up.

Alternating sides from one variable

On desktop each step is a three-column grid (card, rail, empty), and even steps move their card to the third column. The slide-in keyframe reads a --from-x custom property, set to -48px on the left and 48px on the right, so each card comes in from its own side with one keyframe. On phones the rail moves to the left and every card sits to its right.

Progressive enhancement

The base CSS is the finished timeline: cards visible, dots lit and ticked, rail full. The view timelines and animations live inside @media (prefers-reduced-motion: no-preference) and @supports (animation-timeline: view()), so browsers without scroll-driven animations and anyone who prefers reduced motion get a complete, readable page instead of hidden cards. See CSS View Timeline Card Flip In and CSS Scroll Timeline Gauge Needle for more native scroll-driven techniques.

What's included

Features

Real in-card stagger: icon, title, text and tags arrive in order on one shared view timeline
Cards slide in from their own side of the rail and sharpen out of a blur
Focus glow peaks exactly when a step crosses the middle of the screen (cover 50%)
Dots light up and get a tick once passed, and untick when you scroll back
Rail fill whose tip tracks the middle of the screen, using cover 50vh and calc(100% - 50vh)
Alternating left and right layout on desktop, rail on the left on phones
Zero JavaScript: every effect is a CSS view() timeline
Progressive enhancement: the base CSS is the finished timeline for unsupported browsers and reduced motion

Step by step

How to Use

  1. 1
    Paste the HTML and CSSNo JavaScript is needed. You get an intro, a six-step timeline on a vertical rail, and an outro with a button.
  2. 2
    Scroll through the stepsEach card slides in from its side, its contents arrive one after another, it glows at the middle of the screen and its dot gets a tick as you pass.
  3. 3
    Scroll back upThe ticks come off and the rail empties, because every effect follows scroll position.
  4. 4
    Edit the stepsChange the icon SVG, step number, title, text and tags in each .vsl-step. Add or remove steps freely; nothing depends on the count.
  5. 5
    Tune the timingMove the animation-range values: the entry ranges control the slide-in and the stagger, the cover ranges control the glow and when the tick appears.
  6. 6
    Restyle itChange the cyan and violet in the rail gradient, the dot, the focus glow and the tags to match your brand.

Real-world uses

Common Use Cases

Agency and studio process sections
Show how a project runs from brief to launch, with each phase ticked off as the visitor reads.
Onboarding and setup guides
Walk users through the steps to get started, with a rail that shows how far down the list they are.
Product roadmaps and release notes
Turn milestones or releases into a timeline that lights up as people scroll through them.
Company history and "about us" pages
Present years and milestones on an alternating timeline without any animation library.
Learning scroll-driven animations
Named view timelines, entry and cover ranges, fill modes and length offsets, all in one small example.

Got questions?

Frequently Asked Questions

Every child inside a card uses the same keyframe and the same timeline, the step's named view timeline, but with an animation-range that starts ten points later than the previous one. Since they all read the same scroll progress, they always arrive in the same order and spacing, however fast or slow you scroll.

The step element declares view-timeline: --step block. A named view timeline is visible to the element's descendants, so anything inside the step, including pseudo-elements like the dot's tick, can use animation-timeline: --step and pick its own range.

Animations driven by a view timeline respect animation-fill-mode. With both, the dot keeps its end state (lit, ticked) after its range has passed and its start state (empty) before the range starts. Scrolling back moves the timeline backwards, so the tick comes off again.

The rail uses the track's view timeline with animation-range: cover 50vh cover calc(100% - 50vh). That range starts when the track's top reaches the middle of the viewport and ends when its bottom does, so the fill grows exactly as fast as the middle of the screen moves down the list.

All the timelines and animations sit inside @supports (animation-timeline: view()) and @media (prefers-reduced-motion: no-preference). Without support, or with reduced motion, the base CSS shows the finished timeline: every card visible, dots lit and ticked and the rail full.

Copy & paste

Source Code

<main class="vsl-page">
<header class="vsl-intro">
  <span class="vsl-kicker">How we work</span>
  <h1>From brief to launch, in six steps</h1>
  <p>Scroll down. Each step slides in, its contents arrive one after another, it lights up as it passes the middle of the screen and gets ticked off once you are past it. All of it is CSS <code>view()</code> timelines, with no JavaScript.</p>
</header>

<div class="vsl-track">
  <span class="vsl-rail" aria-hidden="true"><i></i></span>
  <ol class="vsl-list">
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h4"/></svg></span><span class="vsl-num">Step 01</span></div>
        <h3>Draft the brief</h3>
        <p>Agree on scope, audience and what success looks like before any design work starts.</p>
        <div class="vsl-tags"><span>Week 1</span><span>Workshop</span></div>
      </article>
    </li>
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"/></svg></span><span class="vsl-num">Step 02</span></div>
        <h3>Sketch the flows</h3>
        <p>Rough wireframes test the structure while changes are still cheap.</p>
        <div class="vsl-tags"><span>Week 2</span><span>Wireframes</span></div>
      </article>
    </li>
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7" rx="1.5"/><rect x="14" y="3" width="7" height="7" rx="1.5"/><rect x="3" y="14" width="7" height="7" rx="1.5"/><rect x="14" y="14" width="7" height="7" rx="1.5"/></svg></span><span class="vsl-num">Step 03</span></div>
        <h3>Design the system</h3>
        <p>Type, colour and spacing as a small reusable kit, not a pile of one-off screens.</p>
        <div class="vsl-tags"><span>Weeks 3–4</span><span>Design system</span></div>
      </article>
    </li>
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><path d="M4 4l7 17 2.5-7.5L21 11z"/></svg></span><span class="vsl-num">Step 04</span></div>
        <h3>Prototype and test</h3>
        <p>Five real users try a clickable prototype before a line of production code is written.</p>
        <div class="vsl-tags"><span>Week 5</span><span>User testing</span></div>
      </article>
    </li>
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><path d="M5 19c1-4 3-7 7-11 3-3 6-4 8-4 0 2-1 5-4 8-4 4-7 6-11 7z"/><path d="M9 15l-3 3M14 6l4 4"/></svg></span><span class="vsl-num">Step 05</span></div>
        <h3>Build and ship</h3>
        <p>Small releases behind a feature flag, each one checked against the brief.</p>
        <div class="vsl-tags"><span>Weeks 6–9</span><span>Releases</span></div>
      </article>
    </li>
    <li class="vsl-step">
      <span class="vsl-dot" aria-hidden="true"></span>
      <article class="vsl-card">
        <div class="vsl-head"><span class="vsl-icon"><svg viewBox="0 0 24 24"><path d="M4 20V10M10 20V4M16 20v-7M22 20H2"/></svg></span><span class="vsl-num">Step 06</span></div>
        <h3>Measure and iterate</h3>
        <p>Close the loop with real numbers. The brief was a hypothesis, not a promise.</p>
        <div class="vsl-tags"><span>Ongoing</span><span>Analytics</span></div>
      </article>
    </li>
  </ol>
</div>

<footer class="vsl-outro">
  <h2>That's the whole process.</h2>
  <p>Scroll back up and the ticks come off one by one, because every effect is tied to scroll position.</p>
  <a class="vsl-btn" href="#">Start a project</a>
</footer>
</main>

Extend with AI

Take This Snippet Further With AI

You do not need an animation library to understand this timeline. Paste this snippet's HTML and CSS into an AI assistant like Claude and ask it how the named view timeline lets the card, its children and the dot share one progress value, how the cover ranges place the glow at the middle of the screen, or why the rail range uses 50vh offsets. It can also help you extend it: add a sticky "Step 3 of 6" counter that changes with the scroll, give the active card a coloured left border, add images to some steps, or switch it to a horizontal timeline.

Prompt to recreate it

Copy this into your AI assistant of choice to build the effect from scratch, or as a jumping-off point for your own variant:

text
Build a scroll-driven process timeline in plain HTML and CSS only (no JavaScript), using CSS scroll-driven animations.

Requirements:
- An intro, a list of six steps on a vertical rail, and an outro with a button. Each step has a dot on the rail and a card with an icon and step number, a title, a short text and tag chips.
- Desktop: each step is a three-column grid (card, rail, empty) and even steps put the card on the right. Phones: the rail on the left and every card to its right.
- Base CSS is the finished state (cards visible, dots lit with a tick, rail full). Put all timelines and animations inside @media (prefers-reduced-motion: no-preference) and @supports (animation-timeline: view()).
- Each step declares view-timeline: --step block. The card animates in over entry 0% entry 90% (slide from its own side using a --from-x variable, rise, scale up, unblur) and has a focus glow over cover 25% cover 75% that peaks at 50%.
- The card's four children use one fade-and-rise keyframe on the same --step timeline with ranges entry 15-65%, 25-75%, 35-85% and 45-100%, which creates the stagger.
- The dot lights up over cover 44% cover 52% and its ::after tick appears over cover 48% cover 54%, using fill-mode both so passed steps stay ticked and untick when scrolling back.
- The list wrapper declares view-timeline: --track block, and the rail fill scales from 0 to 1 over cover 50vh cover calc(100% - 50vh), so its tip stays at the middle of the screen.

Want to tighten it up first? Run this prompt through the AI Prompt Studio to score it across 8 quality dimensions, catch anti-patterns, and tune the wording for Claude, ChatGPT, or Gemini before you paste it in.