Components

Aurora Background

An animated aurora background for React: soft, blurred bands of color that drift and sway like the northern lights. Built with Motion and Tailwind CSS, it animates only GPU-friendly transforms, pauses off-screen and holds a still frame for reduced motion.

  • Background
  • Gradient
  • GPU transforms
  • Pauses off-screen
  • Reduced-motion safe

Deploy previews for every branch

Every push gets its own URL, so reviewers can try changes before they merge.

Installation

$ npx shadcn@latest add https://duskui.com/r/aurora-background.json

The aurora fills its nearest positioned parent, so give the parent relative and overflow-hidden, and put your content after it with relative so it sits on top.

Usage

hero.tsx
import { AuroraBackground } from "@/components/dusk/backgrounds/aurora-background"

export function Hero() {
  return (
    <section className="relative overflow-hidden">
      <AuroraBackground />
      <div className="relative">{/* your content */}</div>
    </section>
  )
}

Examples

Custom palettes

Pass any CSS colors to colors; each one becomes a band, up to six. Colors blend with a screen blend mode, so overlapping bands glow brighter.

Sunset

3 colors

Glacier

4 colors

Subtle backdrop

Lower intensity and speed and raise blur for a quiet backdrop behind forms and dialogs.

Join the waitlist

We will email you once when your invite is ready.

API Reference

Any other div prop is passed to the root. Band positions are fixed per index, so the same palette always draws the same sky on the server and the client.

PropTypeDefaultDescription
colorsstring[]["var(--color-primary)", "#38bdf8", "#6366f1"]Band colors, any CSS color. One band per color, up to six.
intensitynumber0.35Overall brightness, from 0 to 1.
speednumber1Speed multiplier for the drift.
blurnumber64Softness of the bands in px. 0 turns the blur filter off.
fadebooleantrueFade the aurora out toward the bottom and sides.
classNamestring—Merged onto the absolutely positioned root.

Accessibility

  • The aurora is decorative: it is aria-hidden and pointer-events-none, so it never reaches screen readers or blocks clicks.
  • With prefers-reduced-motion the bands stay still in their resting positions; the colors remain.
  • Animation pauses while the aurora is off-screen or the tab is hidden, saving battery.
  • Bright palettes can reduce contrast; keep text on a card or lower the intensity.