Aurora
Slow drifting colour behind your content. Only transforms animate; it stands still with reduced motion. Effects.
Open playgroundAbout
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
npm i @ashutoshswamy/smouiUsage
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.
numberdefault22
More effects components
- BorderBeamA light that runs around the edge of whatever it wraps, at an even pace along straight sides and rounded corners alike. Reduced motion parks it still.
- CompareSliderBefore/after reveal. Drag the divider; the top layer follows on a spring. It sweeps once to show it moves.
- ConfettiButton that throws flat confetti on press. Pieces fly out, tumble, then fall and fade.
- DotFieldA grid of dots that swells and shrinks away from the pointer, then springs home. One canvas, asleep when nothing moves.
- GlassLensA magnifier that drifts after the cursor like a drop of water. Press to zoom further.
- ImageTrailMoving the pointer across the area drops items along its path. Each pops in tilted, holds a moment, then shrinks away, and only a few live at once.