Skip to content

Flip 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-flip" role="img" aria-label="Flip clock 09:25">
  <div class="nuda-flip__card">
    <span class="nuda-flip__top">0</span>
    <span class="nuda-flip__bot nuda-flip__bot--anim">9</span>
    <span class="nuda-flip__hinge"></span>
  </div>
  <div class="nuda-flip__card">
    <span class="nuda-flip__top">9</span>
    <span class="nuda-flip__bot">9</span>
    <span class="nuda-flip__hinge"></span>
  </div>
  <div class="nuda-flip__colon">:</div>
  <div class="nuda-flip__card">
    <span class="nuda-flip__top">2</span>
    <span class="nuda-flip__bot">2</span>
    <span class="nuda-flip__hinge"></span>
  </div>
  <div class="nuda-flip__card">
    <span class="nuda-flip__top">5</span>
    <span class="nuda-flip__bot nuda-flip__bot--anim">5</span>
    <span class="nuda-flip__hinge"></span>
  </div>
</div>
CSS
/* Flip Clock
   Split-flap aesthetic. The bottom half folds down to reveal a new digit.
   In a real implementation, JS would swap the values on each tick. */

.nuda-flip {
  --bg: #111114;
  --ink: #fafafa;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.nuda-flip__card {
  position: relative;
  width: 46px;
  height: 64px;
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.nuda-flip__top,
.nuda-flip__bot {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50%;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
}

.nuda-flip__top {
  top: 0;
  background: linear-gradient(180deg, #1c1c22, #15151a);
  align-items: flex-end;
  padding-bottom: 2px;
}

.nuda-flip__bot {
  bottom: 0;
  background: linear-gradient(180deg, #0e0e12, #16161c);
  align-items: flex-start;
  padding-top: 2px;
}

.nuda-flip__bot--anim {
  transform-origin: top;
  animation: nuda-flip-drop 4s ease-in-out infinite;
}

.nuda-flip__hinge {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nuda-flip__colon {
  font: 600 28px ui-monospace, Menlo, monospace;
  color: var(--ink);
  opacity: 0.6;
  animation: nuda-flip-blink 1s steps(2) infinite;
}

@keyframes nuda-flip-drop {
  0%, 40%   { transform: rotateX(90deg); }
  50%, 100% { transform: rotateX(0); }
}

@keyframes nuda-flip-blink {
  50% { opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-flip__bot--anim,
  .nuda-flip__colon { animation: none; }
}

How to use Flip 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