Horizontal Timeline
A copy-paste timelines component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
TimelinesHTMLCSSany framework
Q1
Q2
Q3
Q4
Copy into your project
HTML
<div class="nuda-tl-horiz">
<div class="nuda-tl-horiz__track"></div>
<div class="nuda-tl-horiz__items">
<div class="nuda-tl-horiz__item nuda-tl-horiz__item--done">
<div class="nuda-tl-horiz__dot"></div>
<span class="nuda-tl-horiz__label">Q1</span>
</div>
<div class="nuda-tl-horiz__item nuda-tl-horiz__item--done">
<div class="nuda-tl-horiz__dot"></div>
<span class="nuda-tl-horiz__label">Q2</span>
</div>
<div class="nuda-tl-horiz__item nuda-tl-horiz__item--active">
<div class="nuda-tl-horiz__dot"></div>
<span class="nuda-tl-horiz__label">Q3</span>
</div>
<div class="nuda-tl-horiz__item">
<div class="nuda-tl-horiz__dot"></div>
<span class="nuda-tl-horiz__label">Q4</span>
</div>
</div>
</div>CSS
.nuda-tl-horiz {
position: relative;
width: 240px;
padding: 16px 0 8px;
}
.nuda-tl-horiz__track {
position: absolute;
top: 27px;
left: 12px;
right: 12px;
height: 2px;
background: rgba(255,255,255,.08);
border-radius: 2px;
}
.nuda-tl-horiz__items {
display: flex;
justify-content: space-between;
position: relative;
}
.nuda-tl-horiz__item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
}
.nuda-tl-horiz__dot {
width: 14px;
height: 14px;
border-radius: 50%;
background: #1a1a1a;
border: 2px solid rgba(255,255,255,.15);
transition: transform .2s;
}
.nuda-tl-horiz__item--done .nuda-tl-horiz__dot {
background: #e4ff54;
border-color: #e4ff54;
}
.nuda-tl-horiz__item--active .nuda-tl-horiz__dot {
background: #1a1a1a;
border-color: #e4ff54;
box-shadow: 0 0 0 3px rgba(228,255,84,.2);
animation: _nuda-tlhpulse 2s ease-in-out infinite;
}
.nuda-tl-horiz__label {
font-size: 10px;
color: #777;
font-weight: 500;
}
.nuda-tl-horiz__item--done .nuda-tl-horiz__label {
color: #cfcfcf;
}
.nuda-tl-horiz__item--active .nuda-tl-horiz__label {
color: #e4ff54;
}
@keyframes _nuda-tlhpulse {
0%,100% {
box-shadow: 0 0 0 3px rgba(228,255,84,.2);
}
50% {
box-shadow: 0 0 0 7px rgba(228,255,84,0);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-tl-horiz__item--active .nuda-tl-horiz__dot {
animation: none;
}
}
How to use Horizontal Timeline
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.