Skip to content

DHMS Boxes

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

CountdownsHTMLCSSany framework
03Days
14Hours
52Mins
07Secs

Copy into your project

HTML
<div class="nuda-cd2-dhms" role="timer" aria-label="Days hours minutes seconds countdown">
  <div class="nuda-cd2-dhms__box">
    <span class="nuda-cd2-dhms__num">03</span>
    <span class="nuda-cd2-dhms__lbl">Days</span>
  </div>
  <div class="nuda-cd2-dhms__box">
    <span class="nuda-cd2-dhms__num">14</span>
    <span class="nuda-cd2-dhms__lbl">Hours</span>
  </div>
  <div class="nuda-cd2-dhms__box">
    <span class="nuda-cd2-dhms__num">52</span>
    <span class="nuda-cd2-dhms__lbl">Mins</span>
  </div>
  <div class="nuda-cd2-dhms__box">
    <span class="nuda-cd2-dhms__num">07</span>
    <span class="nuda-cd2-dhms__lbl">Secs</span>
  </div>
</div>
CSS
.nuda-cd2-dhms {
  display: flex;
  gap: .35rem;
  align-items: stretch;
}

.nuda-cd2-dhms__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .55rem .6rem;
  min-width: 52px;
  gap: 3px;
  position: relative;
  overflow: hidden;
}

.nuda-cd2-dhms__box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(228,255,84,.3),transparent);
}

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

.nuda-cd2-dhms__lbl {
  color: #555;
  font-size: .52rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

How to use DHMS Boxes

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