Page sections / Stats & metrics
Quiet Countdown Readout
Centered two-line white-on-black caption with uppercase label and a monospaced-feel timer, surrounded by generous black space.
Rebuilt from teenage.engineering in the Embossed Lab Monochrome style.
npx shadcn@latest add https://justyoink.it/r/embossed-lab-monochrome/blocks/countdown-footer-text.json
Looks exactly like teenage.engineering: brings its fonts and colours, namespaced so your own theme stays untouched.
npx shadcn@latest add https://justyoink.it/r/embossed-lab-monochrome/mine/countdown-footer-text.json
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: `label` (caption text) and `initialSeconds` (countdown start). The timer ticks every second and stops at 00:00:00.
components/countdown-footer-text.tsx
import { useEffect, useState } from "react"; function pad(n: number) { return String(n).padStart(2, "0"); } function format(total: number) { const t = Math.max(0, total); return `${pad(Math.floor(t / 3600))}:${pad(Math.floor((t % 3600) / 60))}:${pad(t % 60)}`; } export default function QuietCountdownReadout({ label = "Next window opens in:", initialSeconds = 20 * 3600 + 46 * 60 + 24, }: { label?: string; initialSeconds?: number; }) { const [left, setLeft] = useState(initialSeconds); useEffect(() => { const id = setInterval(() => setLeft((s) => (s > 0 ? s - 1 : 0)), 1000); return () => clearInterval(id); }, []); return ( <section className="bg-canvas text-on-dark font-sans animate-fade-in px-6 py-32 md:py-48"> <div className="mx-auto flex max-w-xl flex-col items-center text-center"> <p className="text-body uppercase tracking-[0.02em] font-light">{label}</p> <p role="timer" aria-live="off" aria-label={`Time remaining ${format(left)}`} className="text-body font-light tabular-nums tracking-[0.02em]" > {format(left)} </p> </div> </section> ); }import { useEffect, useState } from "react"; function pad(n: number) { return String(n).padStart(2, "0"); } function format(total: number) { const t = Math.max(0, total); return `${pad(Math.floor(t / 3600))}:${pad(Math.floor((t % 3600) / 60))}:${pad(t % 60)}`; } export default function QuietCountdownReadout({ label = "Next window opens in:", initialSeconds = 20 * 3600 + 46 * 60 + 24, }: { label?: string; initialSeconds?: number; }) { const [left, setLeft] = useState(initialSeconds); useEffect(() => { const id = setInterval(() => setLeft((s) => (s > 0 ? s - 1 : 0)), 1000); return () => clearInterval(id); }, []); return ( <section className="bg-background text-foreground font-mono animate-embossed-fade-in px-6 py-32 md:py-48"> <div className="mx-auto flex max-w-xl flex-col items-center text-center"> <p className="text-embossed-body uppercase tracking-[0.02em] font-light">{label}</p> <p role="timer" aria-live="off" aria-label={`Time remaining ${format(left)}`} className="text-embossed-body font-light tabular-nums tracking-[0.02em]" > {format(left)} </p> </div> </section> ); }
Quality checks
Automated, in a real browser · today- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: passedIts animation plays and finishes with everything visible, and it stays still for people who turn on reduced motion.