A clock with sliding digits and a gradient border. The markup and the animation are server HTML and CSS. A tiny client script reads the time in the visitor's time zone once a second and writes the digits into data attributes, so React never re-renders on a tick. Before the script runs, the clock shows dimmed zeros.
Browser Support
Feature
Baseline
Your browser
Individual transform properties
Slides the digits into place.
Your browser:
Preview
Installation
Usage
import { AnimatedTimer } from "@/components/ui/animated-timer"
export default function Page() {
return <AnimatedTimer />
}Examples
Without seconds
<AnimatedTimer showSeconds={false} />12-hour format
<AnimatedTimer use24Hour={false} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| showSeconds | boolean | true | Show seconds |
| use24Hour | boolean | true | 24-hour format |
| className | string | - | Additional classes |