Skip to content

Dot field

Playground

Shape

Colour

Pointer

Install

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

Works with

React

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

Remotion

Frame-exact through FxTimeProvider or time

Radial

Component Source
import { DotField } from "@shavin/fx/dot-field";

<DotField shape="radial" className="h-72" />

Sphere

Component Source
<DotField shape="sphere" density={1.2} dotSize={1.3} />

Terrain

Component Source
<DotField shape="terrain" dotSize={1.4} speed={0.8} />

Chevron, brand colour

Component Source
<DotField shape="chevron" color="brand" dotSize={2} />

Layers

Component Source
<DotField shape="layers" dotSize={1.4} />

Cloud

Component Source
<DotField shape="cloud" dotSize={1.2} />

Props

PropTypeDefaultDescription
shape"radial" | "sphere" | "terrain" | "chevron" | "layers" | "cloud" | "morph""radial"Arrangement of the dots. morph (words and icons) has its own page, Dot field morph.
targets(string | { text: string } | { icon: string })[][]For morph: the words or icons the dots cycle through.
intervalnumber3200For morph: ms each target holds before the next.
densitynumber1Dot count multiplier, 0.4 to 2.
dotSizenumber1.6Base dot radius in CSS px.
speednumber1Animation speed multiplier.
interactivebooleantruePointer pushes the rings aside, lifts the terrain, brightens the chevron, or turns the sphere, layers and cloud (mouse, touch and pen). Ignored under reduced motion.
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): draws exactly this moment, no clock of its own. Also read from FxTimeProvider.
Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font