Glow · Event
A centered event banner with an amber glow pooled at the bottom, a date line, a light headline, its length between two hairlines and a link. Recolor it by changing one CSS variable.
import { cn } from "cn"
import { buttonVariants } from "@/components/ui/button"
// The copy: change text here, not in the markup.
const COPY = {
label: "Thursday · 18:00 UTC",
title: "Live: lighting a dark hero.",
length: "45 minutes",
action: "Save a seat",
} as const
/** A centered event banner with an amber glow pooled at the bottom and a hairline either side of its length. Change `--glow` to recolor it. */
export default function BannerGlowEvent() {
return (
<div className="relative isolate w-full overflow-hidden rounded-2xl bg-slate-950 text-white [--glow:245_158_11]">
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_center_bottom,rgb(var(--glow)/0.3)_0%,transparent_65%)]"
/>
<div className="relative z-10 flex flex-col items-center gap-4 px-8 py-14 text-center">
<p className="font-mono text-xs tracking-[0.18em] text-white/70 uppercase">
{COPY.label}
</p>
<h2 className="max-w-xl text-4xl font-light tracking-tight">
{COPY.title}
</h2>
<div className="flex w-full max-w-md items-center gap-4">
<div
aria-hidden="true"
className="h-px flex-1 bg-[linear-gradient(to_right,rgb(var(--glow)/0),rgb(var(--glow)/0.5),rgb(var(--glow)/0))]"
/>
<span className="text-sm text-white/70">{COPY.length}</span>
<div
aria-hidden="true"
className="h-px flex-1 bg-[linear-gradient(to_right,rgb(var(--glow)/0),rgb(var(--glow)/0.5),rgb(var(--glow)/0))]"
/>
</div>
<a
href="#"
className={cn(
buttonVariants(),
"h-11 bg-white px-5 text-slate-950 hover:bg-white/90"
)}
>
{COPY.action}
</a>
</div>
</div>
)
}
Installation
pnpm dlx shadcn@latest add @01orbital/banner-glow-eventnpx shadcn@latest add @01orbital/banner-glow-eventyarn dlx shadcn@latest add @01orbital/banner-glow-eventbunx --bun shadcn@latest add @01orbital/banner-glow-eventMake it yours
- Its words are in
COPYat the top ofcomponents/blocks/banner/banner-glow-event/index.tsx: change them there, not in the markup.
Built from
npm: cn. The CLI installs it for you.
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:
- Button
font-geist-mono
The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.
Last updated on