Skip to content

Circular Ring Countdown

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

CountdownsHTMLCSSany framework
47sec

Copy into your project

HTML
<div class="nuda-cd2-ring" role="timer" aria-label="Circular ring countdown">
  <svg class="nuda-cd2-ring__svg" viewBox="0 0 120 120" width="110" height="110">
    <circle class="nuda-cd2-ring__bg" cx="60" cy="60" r="52"></circle>
    <circle class="nuda-cd2-ring__track" cx="60" cy="60" r="52"></circle>
    <circle class="nuda-cd2-ring__progress" cx="60" cy="60" r="52"></circle>
  </svg>
  <div class="nuda-cd2-ring__center">
    <span class="nuda-cd2-ring__num">60</span>
    <span class="nuda-cd2-ring__unit">sec</span>
  </div>
</div>
CSS
.nuda-cd2-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
}

.nuda-cd2-ring__svg {
  transform: rotate(-90deg);
  position: absolute;
  top: 0;
  left: 0;
}

.nuda-cd2-ring__bg {
  fill: #1a1a1a;
  stroke: none;
}

.nuda-cd2-ring__track {
  fill: none;
  stroke: rgba(255,255,255,.07);
  stroke-width: 7;
}

.nuda-cd2-ring__progress {
  fill: none;
  stroke: #e4ff54;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 80;
  animation: _nuda-cd2ring 60s linear forwards;
}

.nuda-cd2-ring__center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.nuda-cd2-ring__num {
  color: #fafafa;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nuda-cd2-ring__unit {
  color: #777;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 2px;
}

@keyframes _nuda-cd2ring {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: 326.7;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-cd2-ring__progress {
    animation: none;
  }
}

How to use Circular Ring Countdown

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 countdowns components

← Browse all NudaUI components