Skip to content

Alternating Sides

A copy-paste timelines component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

TimelinesHTMLCSSany framework
Founded2021
Series A2022
1M users2023
IPO2024

Copy into your project

HTML
<div class="nuda-tl-alt">
  <div class="nuda-tl-alt__spine"></div>
  <div class="nuda-tl-alt__row nuda-tl-alt__row--left">
    <div class="nuda-tl-alt__card">Founded<span>2021</span></div>
    <div class="nuda-tl-alt__dot"></div>
  </div>
  <div class="nuda-tl-alt__row nuda-tl-alt__row--right">
    <div class="nuda-tl-alt__dot"></div>
    <div class="nuda-tl-alt__card">Series A<span>2022</span></div>
  </div>
  <div class="nuda-tl-alt__row nuda-tl-alt__row--left">
    <div class="nuda-tl-alt__card">1M users<span>2023</span></div>
    <div class="nuda-tl-alt__dot"></div>
  </div>
  <div class="nuda-tl-alt__row nuda-tl-alt__row--right">
    <div class="nuda-tl-alt__dot"></div>
    <div class="nuda-tl-alt__card">IPO<span>2024</span></div>
  </div>
</div>
CSS
.nuda-tl-alt {
  position: relative;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.nuda-tl-alt__spine {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.08);
}

.nuda-tl-alt__row {
  display: flex;
  align-items: center;
  position: relative;
}

.nuda-tl-alt__row--left {
  flex-direction: row;
  justify-content: flex-end;
  padding-right: calc(50% + 12px);
}

.nuda-tl-alt__row--right {
  flex-direction: row;
  justify-content: flex-start;
  padding-left: calc(50% + 12px);
}

.nuda-tl-alt__dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e4ff54;
  flex-shrink: 0;
}

.nuda-tl-alt__card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11px;
  color: #cfcfcf;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nuda-tl-alt__card span {
  font-size: 9px;
  color: #777;
  font-weight: 400;
}

How to use Alternating Sides

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.

More timelines components

← Browse all NudaUI components