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 waitlistPlayground
Subject
Form
Trigger
Dot shape
Colour
Pointer
Install
npm install @shavin/fximport { 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
| Prop | Type | Default | Description |
|---|---|---|---|
| subject | string | { 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. |
| burst | boolean | false | For manual: burst (true) or formed (false). |
| progress | number | — | 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. |
| interval | number | 2200 | For interval: ms each state holds. |
| duration | number | 1100 | Ms a burst or contraction takes. |
| spread | number | 1 | How far the dots fly when they burst, 0.5 to 2. They explode toward the camera and past the frame. |
| stagger | number | 0.5 | How ragged the timing is: 0 all at once, 1 a long ripple. |
| trails | number | 0.3 | Faint streaks behind flying dots, 0 (none) to 1 (long). |
| sparkle | number | 0.5 | Dots twinkle and now and then flare, like stars, 0 to 1. |
| label | string | — | Accessible name. Defaults to the subject's word; click falls back to "Burst". |
| density | number | 1 | Dot count multiplier. |
| dotSize | number | 1.5 | Dot radius in CSS px. |
| dotShape | "circle" | "square" | "circle" | Dot shape; flying dots streak either way. |
| interactive | boolean | true | Dots under the pointer erupt along their burst paths (mouse, touch and pen). |
| color | FxColor | "fg" | Dot colour: a theme token (fg, brand, muted), any CSS colour or var(--token), or a { light, dark } pair. |
| tone | FxColor | — | Deprecated: use color. |
| grain | number | 0 | Film grain over the canvas, 0 to 0.3 (0 is off). |
| time | number | — | Controlled time in seconds (e.g. frame / fps in Remotion); also read from FxTimeProvider. |