Glow · Launch
A launch banner lit purple from above, with a light headline, one line of copy and two links in a glow-bordered card. Recolor it by changing one CSS variable.
import { ArrowRightIcon } from "@phosphor-icons/react/ssr"
import { cn } from "cn"
import { buttonVariants } from "@/components/ui/button"
// The copy: change text here, not in the markup.
const COPY = {
title: "Glow, without the noise.",
description: "A dark hero, one light from above, and a card that catches it.",
primary: "Get started",
secondary: "Docs",
} as const
/** A launch banner lit purple from above, with its copy in a glow-bordered card. Change `--glow` to recolor it. */
export default function BannerGlowLaunch() {
return (
<div className="relative isolate w-full overflow-hidden rounded-2xl bg-slate-950 text-white [--glow:139_92_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 items-center px-4 py-16">
<div className="relative w-full max-w-3xl 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-6 md:p-8">
<h2 className="text-4xl font-light tracking-tight md:text-6xl">
{COPY.title}
</h2>
<p className="mt-4 text-lg text-white/70">{COPY.description}</p>
<div className="mt-6 flex justify-center gap-3">
<a
href="#"
className={cn(
buttonVariants(),
"h-11 bg-white px-5 text-slate-950 hover:bg-white/90"
)}
>
{COPY.primary} <ArrowRightIcon />
</a>
<a
href="#"
className={cn(
buttonVariants({ variant: "outline" }),
"h-11 border-white/20 bg-transparent px-5 text-white hover:bg-white/10 hover:text-white"
)}
>
{COPY.secondary}
</a>
</div>
</div>
</div>
</div>
</div>
)
}
Installation
pnpm dlx shadcn@latest add @01orbital/banner-glow-launchnpx shadcn@latest add @01orbital/banner-glow-launchyarn dlx shadcn@latest add @01orbital/banner-glow-launchbunx --bun shadcn@latest add @01orbital/banner-glow-launchMake it yours
- Its words are in
COPYat the top ofcomponents/blocks/banner/banner-glow-launch/index.tsx: change them there, not in the markup.
Built from
npm: @phosphor-icons/react, cn. The CLI installs them 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:
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