A glow on the inside edge of a shape, moving with a voice. Wrap an element, use it bare, or lay it over the whole screen.
Demo voice
Source
Palette
Intensity1.00
Speed1.00
NeedsReactTheme
Sourcecurl --create-dirs -o src/components/aura.tsx https://fragms.simonveprek.cz/source/aura -o src/components/theme.tsx https://fragms.simonveprek.cz/source/themeSaves src/components/aura.tsx and theme.tsx beside it. No setup, works in any React project.
import { Aura, demoLevel } from "@/components/aura";export function Example() { return ( <Aura level={demoLevel} className="rounded-[46px]"> <Screen /> </Aura> );}
levelHow loud the voice is. The glow swells with it. Pass a function to have it read every frame.
0 to 1() => numberDefault 0paletteThe colours that travel round the edge. Four of your own work too.
auroraoceanembermono[a, b, c, d]intensityHow far the glow reaches into the shape.
0.411.8speedHow fast the colours travel. 0 holds them still.
013radiusCorner radius in pixels. Left out, it follows the element it wraps.
numberDefault the wrapper's ownfixedLays the glow over the whole screen. Clicks pass through.
truefalse// Around any element. It picks up the corner radius for you<Aura level={level} className="rounded-3xl"> <Card /></Aura>// As a shape of its own, in four colours of your choosing<Aura level={0.4} palette={["#00e0ff", "#0066ff", "#7a5cff", "#00ffa3"]} className="size-40 rounded-full"/>// Across the whole screen, above everything. Clicks pass through<Aura fixed level={level} />
What's new
- 2.0
- Takes its glow and pace from the Theme when it has none of its own
- 1.0
- First release