ParticleField
An animated 3D particle field with optional connection lines between nearby particles. Built with Three.js and @react-three/fiber.
Interactive Demo
Loading particles...
Color
Particles: 150
Usage
import { ParticleField } from "@mantleui/react/three";
<ParticleField count={200} color="#8b5cf6" height={400} connections/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
count | number | 200 | Number of particles. |
color | string | "#3b82f6" | Particle and connection line color. |
particleSize | number | 0.015 | Size of each particle. |
spread | number | 5 | Spread radius of the particle field. |
speed | number | 1 | Animation speed multiplier. |
connections | boolean | true | Show connection lines between nearby particles. |
connectionDistance | number | 1.5 | Maximum distance for drawing connections. |
connectionOpacity | number | 0.15 | Opacity of connection lines. |
backgroundColor | string | "transparent" | Background color of the container. |
height | string | number | "400px" | Height of the container. |
count200numberNumber of particles.
color"#3b82f6"stringParticle and connection line color.
particleSize0.015numberSize of each particle.
spread5numberSpread radius of the particle field.
speed1numberAnimation speed multiplier.
connectionstruebooleanShow connection lines between nearby particles.
connectionDistance1.5numberMaximum distance for drawing connections.
connectionOpacity0.15numberOpacity of connection lines.
backgroundColor"transparent"stringBackground color of the container.
height"400px"string | numberHeight of the container.