Skip to content
ReactHive

Mercury Clock

A clock, or a countdown, cast in liquid mercury. Each digit melts into the next as it changes, swelling and wobbling like a drop on its way, while a studio of soft lights slides across the metal. The pointer warms the surface into ripples; a click sends a splash ring across every digit.

TextReactHive OriginalNo packages, just React and Tailwind CSS
Mercury ClockText

How It Works

The digits 0 to 9 and the colon are drawn once and turned into a signed distance field with an exact distance transform, so every pixel knows how far it is from the nearest edge. When a digit changes, its slot blends the old field into the new one, adding a swell and a little noise in the middle of the melt, which is what makes it flow like liquid. The field becomes a rounded height, its slope a normal, and the normal reflects a procedural studio: softbox, horizon, strip light and tinted floor. The pointer and clicks add ripples to the height.

Use It

Install it with shadcn, or copy the file into your components folder, then use it like this. Change a setting in the demo and the example picks it up. Works with Next.js (App Router) and any React 19 project on Tailwind CSS v4.

npx shadcn@latest add @reacthive/mercury-clock
Example
<div className="h-[40vh]">
  <MercuryClock to="2026-12-01T09:00:00Z" className={font.className} weight={600} />
</div>
  • With to, it counts down days, hours, minutes and seconds to that moment; without it, it shows the time here. It fills its parent, sized to fit.
  • melt is how long a digit takes to become the next, in seconds. tint colours the reflections. The digits are drawn in the parent's font: pass a next/font className and weight.
  • Screen readers get the time as text in a timer. With reduced motion digits change at once and nothing ripples.
  • Plain WebGL2, no packages. Each character is turned into a distance field once when the font is ready.

Mercury Clock, Answered.

Free to use, what it needs and where it came from.

Your Next Site Starts with a Live Demo.

Click around first. What you see is exactly what you download.

Start a Project

Tell us what you're making. A few lines is plenty; we'll ask the rest on a call.

What do you need?
Rough budget (optional)

Or email projects@reacthive.dev