SHOWCASE / OBJECTS
A swarm of anything.
A shape, a letter, an image, or live HTML. Choose what each particle is.
LIVE FORMATION
Move through the swarm. Choose its next form.
40 OBJECTS / SHAPE
THE DEFINITION
One object. Every particle.
The formation decides where things go. The object decides what they are: geometry, characters, images, or your own React component.
Copy this definition into your React app. The default dot renderer stays available when particle is omitted.
import { DotSwarm, type ParticleObject } from "dots-swarm";
const particle: ParticleObject = {
"size": 30,
"variation": 0.12,
"seed": 7,
"rotation": {
"mode": "fixed",
"speed": 18
},
"material": {
"kind": "flat"
},
"kind": "shape",
"shape": "triangle"
};
export function ParticleStudy() {
return <DotSwarm
shape="cloud"
count={40}
color="#d8dce3"
particle={particle}
interactive={true}
style={{ height: 520 }}
/>;
}