Glow · Countdown
A countdown banner lit blue from above, with each number in a small glow-bordered card. Recolor it by changing one CSS variable.
// The copy: change text here, not in the markup.
const COPY = {
label: "Doors open in",
title: "The glow drop.",
} as const
const COUNTDOWN = [
{ value: "04", unit: "Days" },
{ value: "06", unit: "Hrs" },
{ value: "15", unit: "Min" },
] as const
/** A countdown banner lit blue from above, with each number in a small glow-bordered card. Change `--glow` to recolor it. */
export default function BannerGlowCountdown() {
return (
<div className="relative isolate w-full overflow-hidden rounded-2xl bg-slate-950 text-white [--glow:59_130_246]">
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_center_top,rgb(var(--glow)/0.3)_0%,transparent_60%)]"
/>
<div className="relative z-10 flex flex-col gap-6 p-8 md:flex-row md:items-center md:justify-between md:p-10">
<div>
<p className="font-mono text-xs tracking-[0.18em] text-white/70 uppercase">
{COPY.label}
</p>
<h2 className="mt-2 text-3xl font-light tracking-tight">
{COPY.title}
</h2>
</div>
<div className="flex gap-3">
{COUNTDOWN.map((part) => (
<div
key={part.unit}
className="relative w-24 rounded-2xl bg-slate-900/80 text-center shadow-[0_0_60px_rgb(var(--glow)/0.25)]"
>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 rounded-2xl bg-[linear-gradient(to_bottom_right,rgb(var(--glow)/0.2),rgb(var(--glow)/0.06)_50%,transparent)]"
/>
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 rounded-2xl border border-[rgb(var(--glow)/0.3)] shadow-[inset_0_0_20px_rgb(var(--glow)/0.1)]"
/>
<div className="relative z-10 p-3">
<span className="block font-mono text-3xl font-light">
{part.value}
</span>
<span className="mt-1 block font-mono text-xs tracking-widest text-white/70 uppercase">
{part.unit}
</span>
</div>
</div>
))}
</div>
</div>
</div>
)
}
Installation
pnpm dlx shadcn@latest add @01orbital/banner-glow-countdownnpx shadcn@latest add @01orbital/banner-glow-countdownyarn dlx shadcn@latest add @01orbital/banner-glow-countdownbunx --bun shadcn@latest add @01orbital/banner-glow-countdownMake it yours
- Its words are in
COPYat the top ofcomponents/blocks/banner/banner-glow-countdown/index.tsx: change them there, not in the markup. COUNTDOWN, also at the top of the file, holds its lists and settings.
Built from
Built from these parts. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:
font-geist-mono
Last updated on