Skip to content

Vertical Timeline

Responsive Tailwind CSS vertical timeline with icon markers, dates, category labels and descriptions that alternate left and right on wider screens.

Also known as: company history timeline, roadmap timeline, milestone timeline, alternating timeline

Vertical Timeline live demo

Open in new tab

Tailwind CSS code (HTML)

A vertical timeline built only with Tailwind CSS utility classes: round icon markers on a gradient line, date and category labels, a title and a short description for each event. On phones the line runs down the left edge; from the md breakpoint the line moves to the center and the cards alternate left and right. Use it for company history, product roadmaps, changelogs, project milestones or a "how we got here" section on an about page.

How it works

The root is .ttv-timeline, a section labelled by its heading. The events live in an ordered list, .ttv-list, because their order carries meaning. The connecting line is not an extra element: it is the list's ::before pseudo-element, created with before:absolute before:w-0.5 before:content-[''] and a before:bg-gradient-to-b teal fade. It sits at before:left-6 on small screens and md:before:left-1/2 on wider ones.

Each li.ttv-item reserves room on the left with pl-16 and contains an absolutely positioned 48px icon circle, centered on the line with -translate-x-1/2 and separated from it by a ring-8 ring-teal-50 halo that matches the page background. From md up the item becomes a two-column grid (md:grid md:grid-cols-2 md:gap-16): odd cards use md:col-start-1 md:text-right and even cards use md:col-start-2, while the icon moves to md:left-1/2, the exact middle of the gap. Dates use a time element with an ISO datetime. The last item is styled as "Upcoming" with a dashed, white marker to show a future event. No JavaScript or custom CSS is needed.

Customization

  • md:col-start-1 md:text-right / md:col-start-2 on .ttv-card: set every card to md:col-start-2 for a single-sided timeline on desktop too.
  • md:before:left-1/2 on .ttv-list and md:left-1/2 on the icons: remove both to keep the line on the left at all sizes.
  • before:from-teal-500 before:via-teal-300 before:to-teal-100: change the line gradient, or use before:bg-slate-200 for a flat line.
  • bg-teal-600 on a marker: give individual events their own color, for example bg-rose-600 for incidents or bg-amber-500 for warnings.
  • border-2 border-dashed border-teal-500 bg-white on the last marker: reuse it on any planned or not-yet-finished event.
  • ring-8 ring-teal-50 on the markers: keep the ring color equal to the bg-teal-50 section background so the line looks interrupted around each icon.
  • pb-10 on .ttv-item: raise for more breathing room between events, lower for a dense changelog.

Use cases

  • About pages: tell the company history with dated events alternating left and right of a center line
  • Product roadmaps: mark shipped milestones and show a dashed Upcoming marker for planned work
  • Changelogs: list releases with date, category label and short description in chronological order
  • Project pages: show phases and milestones that collapse into a left-aligned line on phones

Accessibility

The ordered list gets role="list" so its list semantics survive Tailwind's list-style: none reset in Safari, and screen readers announce the number of events. Each event has an h3 title under the section h2. Icons are decorative and marked aria-hidden, so the date, category label and text carry the meaning on their own. All text meets WCAG AA contrast on white cards, and the only motion, a shadow transition on hover, is turned off with motion-reduce:transition-none.

Usage notes

Add or remove li.ttv-item blocks freely; when you insert an item in the middle, swap the md:col-start-* classes of the following cards to keep the alternation.

Vertical Timeline at a glance

Framework
Tailwind CSS
Code
HTML
JavaScript
Only Tailwind CSS's own script
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Timelines
License
Free for personal and commercial use

Questions about this template

Can I use the Vertical Timeline code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Tailwind CSS's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Vertical Timeline – free Tailwind CSS timeline template
Vertical Timeline · free Tailwind CSS timeline template

More Timelines

Timeline with Scroll Progress Line – free Pure CSS timeline template

Timeline with Scroll Progress Line

Dark vertical timeline whose glowing center line fills as you scroll, lighting up each milestone when it is reached. Alternating cards on desktop.

Alternating Timeline – free Pure CSS timeline template

Alternating Timeline

Pure CSS vertical timeline with a center line and entries that alternate left and right, collapsing to a single column on mobile.

Activity Feed Timeline – free Bootstrap 5 timeline template

Activity Feed Timeline

Dark Bootstrap 5 activity feed timeline with colored event icons, timestamps, quoted comments and filter chips for code, comments and deploys.