Components / Backgrounds
Aurora Background
Slowly drifting, blurred blobs of light that make a living gradient background.
Northern lights
A living gradient for your hero section.
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/aurora-background.tsx. - 3
Use it
example.tsximport { AuroraBackground } from "@/components/ui/aurora-background"; export default function AuroraBackgroundDemo() { return ( <AuroraBackground className="flex h-72 w-full items-center justify-center rounded-2xl"> <div className="text-center"> <h3 className="text-3xl font-semibold tracking-tight text-zinc-900 dark:text-white">Northern lights</h3> <p className="mt-2 text-sm text-zinc-700 dark:text-zinc-300">A living gradient for your hero section.</p> </div> </AuroraBackground> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | — | Colors of the light blobs. |
| speed | number | 1 | Speed multiplier. |
| children | ReactNode | — | Content shown on top. |