- Docs
- Components
- 3D & Shaders
- Particle Morph
Particle Morph
GPU particles that flow between a sequence of images, logos and silhouettes
Customize
Props
27| Name | Type | Default | Description |
|---|---|---|---|
images | string[] | required | Ordered image sources the particles morph between |
activeIndex | number | undefined | Controlled index of the image currently formed |
defaultIndex | number | 0 | Initial index when uncontrolled |
autoplay | boolean | true | Advance to the next image automatically |
interval | number | 3000 | Time each image is held before autoplay advances, in ms |
transitionDuration | number | 1800 | Duration of one morph, in ms |
particleDensity | number | 80 | Particles per 1,000 square CSS pixels of the frame |
particleSize | number | 2 | Particle diameter in CSS pixels |
particleOpacity | number | 0.9 | Peak particle opacity |
dispersion | number | 1 | Orbital swing particles take while travelling, 0 = straight lines |
chaos | number | 0 | How far particles burst outward in waves before regrouping into the next shape, 0 = direct morph |
idleDrift | number | 1 | Amplitude of the resting drift and sway, 0 holds particles still |
idleSpeed | number | 1 | Speed multiplier for the resting drift |
pointerStrength | number | 1 | How hard the pointer pushes particles away, 0 disables it |
pointerRadius | number | 120 | Radius of the pointer influence in CSS pixels |
glow | number | 0.6 | Bloom strength around the particles, 0 disables the pass |
aberration | number | 1.5 | Chromatic aberration at the frame edge in CSS pixels; pulses while morphing, 0 disables |
color | string | undefined | Solid particle color; omit to sample colors from the images |
backgroundColor | string | "#0a0a0a" | Background fill color |
luminanceThreshold | number | 0 | Pixels darker than this (0 to 1) count as background and get no particles |
loop | boolean | true | Wrap from the last image back to the first when autoplaying |
onIndexChange | (index: number) => void | undefined | Called whenever the formed image changes, including from autoplay |
width | string | number | "100%" | Container width |
height | string | number | "100%" | Container height |
className | string | undefined | Additional CSS classes |
children | ReactNode | undefined | Content rendered above the effect |
dpr | number | 2 | Maximum device pixel ratio |
imagesstring[]Ordered image sources the particles morph between
requiredactiveIndexnumberControlled index of the image currently formed
undefineddefaultIndexnumberInitial index when uncontrolled
0autoplaybooleanAdvance to the next image automatically
trueintervalnumberTime each image is held before autoplay advances, in ms
3000transitionDurationnumberDuration of one morph, in ms
1800particleDensitynumberParticles per 1,000 square CSS pixels of the frame
80particleSizenumberParticle diameter in CSS pixels
2particleOpacitynumberPeak particle opacity
0.9dispersionnumberOrbital swing particles take while travelling, 0 = straight lines
1chaosnumberHow far particles burst outward in waves before regrouping into the next shape, 0 = direct morph
0idleDriftnumberAmplitude of the resting drift and sway, 0 holds particles still
1idleSpeednumberSpeed multiplier for the resting drift
1pointerStrengthnumberHow hard the pointer pushes particles away, 0 disables it
1pointerRadiusnumberRadius of the pointer influence in CSS pixels
120glownumberBloom strength around the particles, 0 disables the pass
0.6aberrationnumberChromatic aberration at the frame edge in CSS pixels; pulses while morphing, 0 disables
1.5colorstringSolid particle color; omit to sample colors from the images
undefinedbackgroundColorstringBackground fill color
"#0a0a0a"luminanceThresholdnumberPixels darker than this (0 to 1) count as background and get no particles
0loopbooleanWrap from the last image back to the first when autoplaying
trueonIndexChange(index: number) => voidCalled whenever the formed image changes, including from autoplay
undefinedwidthstring | numberContainer width
"100%"heightstring | numberContainer height
"100%"classNamestringAdditional CSS classes
undefinedchildrenReactNodeContent rendered above the effect
undefineddprnumberMaximum device pixel ratio
2