Skip to content

Git Commit Style

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

TimelinesHTMLCSSany framework
a3f2d9feat: add dark modenow
b81c4efix: navbar overflow2h
c09a12chore: update deps1d
d77f3brefactor: split utils2d

Copy into your project

HTML
<div class="nuda-tl-git">
  <div class="nuda-tl-git__commit">
    <div class="nuda-tl-git__line"></div>
    <div class="nuda-tl-git__circle"></div>
    <code class="nuda-tl-git__hash">a3f2d9</code>
    <span class="nuda-tl-git__msg">feat: add dark mode</span>
    <span class="nuda-tl-git__time">now</span>
  </div>
  <div class="nuda-tl-git__commit">
    <div class="nuda-tl-git__line"></div>
    <div class="nuda-tl-git__circle"></div>
    <code class="nuda-tl-git__hash">b81c4e</code>
    <span class="nuda-tl-git__msg">fix: navbar overflow</span>
    <span class="nuda-tl-git__time">2h</span>
  </div>
  <div class="nuda-tl-git__commit">
    <div class="nuda-tl-git__line"></div>
    <div class="nuda-tl-git__circle"></div>
    <code class="nuda-tl-git__hash">c09a12</code>
    <span class="nuda-tl-git__msg">chore: update deps</span>
    <span class="nuda-tl-git__time">1d</span>
  </div>
  <div class="nuda-tl-git__commit">
    <div class="nuda-tl-git__line"></div>
    <div class="nuda-tl-git__circle"></div>
    <code class="nuda-tl-git__hash">d77f3b</code>
    <span class="nuda-tl-git__msg">refactor: split utils</span>
    <span class="nuda-tl-git__time">2d</span>
  </div>
</div>
CSS
.nuda-tl-git {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 240px;
  font-family: monospace;
}

.nuda-tl-git__commit {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 7px 0;
}

.nuda-tl-git__line {
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.07);
}

.nuda-tl-git__commit:first-child .nuda-tl-git__line {
  top: 50%;
}

.nuda-tl-git__commit:last-child .nuda-tl-git__line {
  bottom: 50%;
}

.nuda-tl-git__circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid #6366f1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.nuda-tl-git__commit:first-child .nuda-tl-git__circle {
  border-color: #e4ff54;
  background: rgba(228,255,84,.1);
}

.nuda-tl-git__hash {
  font-size: 9px;
  color: #6366f1;
  background: rgba(99,102,241,.12);
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.nuda-tl-git__commit:first-child .nuda-tl-git__hash {
  color: #e4ff54;
  background: rgba(228,255,84,.12);
}

.nuda-tl-git__msg {
  font-size: 10px;
  color: #cfcfcf;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nuda-tl-git__time {
  font-size: 9px;
  color: #555;
  flex-shrink: 0;
}

How to use Git Commit Style

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