Skip to content
WANCRAFT

E.17Backgrounds & Effects

Aurora Field

A fluid colour atmosphere of drifting, blurred light that fills its container.

ReactCSSTailwindintermediate

Overview

Aurora Field layers four soft radial masses — two primary, one secondary sweep and a deep anchoring tone — and drifts them along hand-tuned paths. Only transforms are animated through the Web Animations API, so the work stays on the compositor; loops pause offscreen and in background tabs, and speed changes retime the loops without restarting them. Reduced-motion users see a still, composed frame.

01Installation

Method 01 · Registry

CLI verified

Uses the shadcn CLI in a project initialised with shadcn init. Installs the file to components/ui/aurora-field.tsx and adds its dependencies.

npx shadcn@latest add https://wancraft.my/r/aurora-field.json

Method 02 · Copy and paste

  1. 1. No extra dependencies — React and Tailwind CSS only.
  2. 2. Copy the source from the Code tab into components/ui/aurora-field.tsx.
  3. 3. Import it and adjust props.
Dependencies
None
Peer
react ≥ 18, tailwindcss ≥ 4
Added
1 Oct 2026
Updated
—

02Usage

The default configuration. Change properties above to generate a tailored example in the Usage tab.

example.tsx
import { AuroraField } from "@/components/ui/aurora-field";

export function AuroraFieldExample() {
  return (
    <div className="relative h-80 w-full overflow-hidden rounded-xl">
      <AuroraField>
        <div className="grid h-full place-items-center text-2xl font-medium">Atmosphere</div>
      </AuroraField>
    </div>
  );
}

03Props

PropTypeDefaultDescription
colorAstring"#FF7448"Primary colour, used by the two largest masses.
colorBstring"#B6F3D1"Secondary colour for the opposing sweep.
colorCstring"#0E4F4C"Deep anchoring colour that drifts slowest.
intensitynumber0.7Opacity of the whole field (0–1).
blurnumber72Blur radius in px applied to each blob.
speednumber1Playback speed multiplier. 0 renders a still composition.
childrenReactNode—Optional content rendered above the field, filling it.
...propsHTMLAttributes<HTMLDivElement>—Forwarded to the root, which is absolute inset-0 — place it inside a positioned parent.

04Features

  • 01Transform-only animation via the Web Animations API (GPU-composited)
  • 02Pauses when offscreen (IntersectionObserver) or when the tab is hidden
  • 03Speed changes retime running loops without restarting
  • 04Fills any positioned parent; content can be layered on top
motion · continuousmotion · tweeninput · viewport

05Accessibility

  • The colour layer is aria-hidden and ignores pointer events.
  • prefers-reduced-motion renders a still composition with no animation.
  • Purely decorative: ensure overlaid text keeps sufficient contrast for your chosen palette.

06Limitations

  • Large blur radii on very large surfaces cost GPU memory on low-end devices; keep blur moderate for full-page use.