Aurora

Slow drifting colour behind your content. Only transforms animate; it stands still with reduced motion. Effects.

Open playground
Something is coming

About

Aurora is a React component in the Effects category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Aurora } from "@ashutoshswamy/smoui" and set children, colors, duration.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Aurora } from "@ashutoshswamy/smoui";

<Aurora className="rounded-3xl p-16" colors={["#7c5cff", "#2bd4a8", "#ff6ab0"]}>
  <h2>Something is coming</h2>
</Aurora>

Props 3

children

Content over the glow.

ReactNode
colors

Three or four colours, one per blob.

string[]
duration

Seconds for the slowest drift.

numberdefault 22