Dot cloud
Playground
Colour
Pointer
Install
npm install @shavin/fximport { DotCloud } from "@shavin/fx";Works with
React
Client component; Next.js and any React 18+ app
Remotion
Frame-exact through FxTimeProvider or time
Usage
Component Source
import { DotCloud } from "@shavin/fx";
<DotCloud />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| density | number | 1 | Dot count multiplier, 0.4 to 2. |
| dotSize | number | 1.6 | Dot radius in CSS px. |
| speed | number | 1 | Animation speed multiplier; 0 holds still. |
| interactive | boolean | true | The cloud turns toward the pointer (mouse, touch and pen). Ignored under reduced motion. |
| 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. |