Skip to content

Dot burst

Pro effect

Most Shavin FX effects are free. This one is part of Shavin FX Pro, in early access. Join the Pro waitlist and we will email you once when access opens. You can preview it here in the meantime.

Join the FX Pro waitlist

Playground

Subject

Form

Trigger

Dot shape

Colour

Pointer

Install

npm install @shavin/fx
import { DotBurst } from "@shavin/fx";

Works with

React

Client component; Next.js and any React 18+ app

Remotion

Frame-exact through FxTimeProvider or time

Loop

Component Source
import { DotBurst } from "@shavin/fx";

<DotBurst />

Grid of squares

Component Source
<DotBurst subject={{ form: "grid" }} dotShape="square" spread={1.4} />

Word on hover

Component Source
<DotBurst subject="Shavin" trigger="hover" spread={1.2} />

Logo on click

Component Source
<DotBurst subject={{ src: "/assets/shavin-mark.svg" }} trigger="click" label="Shavin" color="brand" />

Driven by Remotion

Component Source
// progress is a pure function of the frame, so every render matches.
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const progress = interpolate(frame, [30, 60, 120, 150], [0, 1, 1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });

<DotBurst subject={{ icon: "zap" }} progress={progress} time={frame / fps} />

Props

PropTypeDefaultDescription
subjectstring | { text } | { icon } | { src } | { form: "sphere" | "grid" | "ring" | "heart" }{ form: "sphere" }What the dots hold. The sphere is a turning 3D globe. Images use their transparency, or the brighter half of a photo; same-origin or CORS.
trigger"interval" | "hover" | "click" | "manual""interval"What bursts it. click also answers Enter and Space; manual follows burst.
burstbooleanfalseFor manual: burst (true) or formed (false).
progressnumber—Drive it yourself, 0 formed to 1 burst (scroll, Remotion). Overrides trigger.
onBurstChange(burst: boolean) => void—Called when a hover or click changes the state.
intervalnumber2200For interval: ms each state holds.
durationnumber1100Ms a burst or contraction takes.
spreadnumber1How far the dots fly when they burst, 0.5 to 2. They explode toward the camera and past the frame.
staggernumber0.5How ragged the timing is: 0 all at once, 1 a long ripple.
trailsnumber0.3Faint streaks behind flying dots, 0 (none) to 1 (long).
sparklenumber0.5Dots twinkle and now and then flare, like stars, 0 to 1.
labelstring—Accessible name. Defaults to the subject's word; click falls back to "Burst".
densitynumber1Dot count multiplier.
dotSizenumber1.5Dot radius in CSS px.
dotShape"circle" | "square""circle"Dot shape; flying dots streak either way.
interactivebooleantrueDots under the pointer erupt along their burst paths (mouse, touch and pen).
colorFxColor"fg"Dot colour: a theme token (fg, brand, muted), any CSS colour or var(--token), or a { light, dark } pair.
toneFxColor—Deprecated: use color.
grainnumber0Film grain over the canvas, 0 to 0.3 (0 is off).
timenumber—Controlled time in seconds (e.g. frame / fps in Remotion); also read from FxTimeProvider.
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font