Aurora background preview

Aurora background

Slow drifting bands of soft color behind your content.

  • Group
    Effects
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/aurora-background

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { AuroraBackground } from "@/registry/components/aurora-background/aurora-background";

<AuroraBackground>Label</AuroraBackground>

Props

PropTypeDefaultDescription
children?ReactNode
colors?string[]["oklch(72% .17 280)", "oklch(78% .14 200)", "oklch(80% .13 340)", "oklch(84% .12 90)"]Three or more colors for the bands.
speed?number18Seconds per drift cycle.
blur?number48Blur radius of the bands, px.
fade?booleantrueFade the aurora out toward the bottom.

Also accepts every prop of HTMLAttributes<HTMLDivElement>.

When to use

Soft ambient backgrounds for heroes and empty states.

When not to use

Behind dense text without a contrast layer.

Related

Grid background · Meteors · Ripple