Components
Aurora Gradient
A slowly shifting aurora gradient.
Ship faster
<AuroraGradient>
<Hero />
</AuroraGradient>Installation
npx shadcn@latest add https://ui.zjkm.tech/r/aurora-gradient.jsonimport { AuroraGradient } from "@/components/aurora-gradient"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
Soft, blurred fields of colour drift slowly behind your content. It's pure CSS. Give the wrapper a dark background for the classic aurora look.
import { AuroraGradient } from "@/components/aurora-gradient";
export function Hero() {
return (
<AuroraGradient className="rounded-2xl bg-neutral-950 p-16" colors={["#22d3ee", "#a78bfa", "#34d399"]}>
<h1 className="text-white">Ship faster</h1>
</AuroraGradient>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Content shown over the aurora. | |
colors | [string, string, string] | ["#22d3ee", "#a78bfa", "#34d399"] | The three colour fields. |
speed | number | 12 | Seconds per drift. |
blur | number | 60 | Blur in pixels. |
className | string | Classes for the wrapper. |
With reduced motion, the colours stay still.