Skip to content

Binary Clock

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

Watch Faces & ClocksHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-bin" role="img" aria-label="Binary clock 14:25:08">
  <div class="nuda-bin__label">H · M · S</div>
  <div class="nuda-bin__grid">
    <!-- 6 columns: H-tens, H-ones, M-tens, M-ones, S-tens, S-ones -->
    <!-- Each column has 4 rows (8, 4, 2, 1) -->
    <div class="nuda-bin__col">
      <span class="nuda-bin__dot"></span>
      <span class="nuda-bin__dot"></span>
      <span class="nuda-bin__dot"></span>
      <span class="nuda-bin__dot nuda-bin__dot--on"></span>
    </div>
    <!-- ...repeat for each column with appropriate bits... -->
  </div>
  <div class="nuda-bin__foot">14:25:08</div>
</div>
CSS
/* Binary Clock
   Six columns of 4 dots representing BCD-encoded hours, minutes, seconds.
   Lit dots use the accent color with a subtle glow pulse. */

.nuda-bin {
  --accent: #6ee7b7;
  --off: #1a1a20;
  display: inline-block;
  padding: 14px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-family: ui-monospace, Menlo, monospace;
  color: #fafafa;
}

.nuda-bin__label {
  font-size: 9px;
  letter-spacing: 3px;
  color: #63636e;
  margin-bottom: 8px;
  text-align: center;
}

.nuda-bin__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.nuda-bin__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nuda-bin__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--off);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nuda-bin__dot--on {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: nuda-bin-glow 3s ease-in-out infinite;
}

.nuda-bin__dot--on:nth-child(2) { animation-delay: 0.4s; }
.nuda-bin__dot--on:nth-child(3) { animation-delay: 0.8s; }

.nuda-bin__foot {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  color: #a0a0a8;
}

@keyframes nuda-bin-glow {
  0%, 100% { box-shadow: 0 0 8px var(--accent); }
  50%      { box-shadow: 0 0 14px var(--accent); }
}

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

How to use Binary Clock

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 watch faces & clocks components

← Browse all NudaUI components