Sparkles

Stars blink around whatever you wrap, each on its own clock and each landing somewhere new. None for reduced motion. Effects.

Open playground
Magic

About

Sparkles 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 { Sparkles } from "@ashutoshswamy/smoui" and set children, count, color.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

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

<Sparkles count={8}><h2>Magic</h2></Sparkles>

Props 3

children

What the stars gather around.

ReactNode
count

Stars alive at once. Default 7.

number
color

Star colour. Default the accent.

string