Bring energy and movement to your web designs with JavaScript particle effects. This collection showcases interactive particles, floating shapes, trails, and dynamic backgrounds powered by lightweight libraries and custom JavaScript.
29 JavaScript Particles
Interactive Canvas Particle Image Effect
demo & codeThis is an Interactive Canvas Particle Image Effect. It reconstructs standard raster images using thousands of autonomous floating particles. Its function is to create a highly tactile visual experience that reacts to cursor proximity, morphing colors based on hidden alternate image data to remove the static barrier between user and interface.
Interactive Physics-Based Dot Grid
demo & codeThis is an Interactive Physics-Based Dot Grid. It transforms a static matrix of circular DOM elements into a reactive, liquid-like surface. Its function is to provide an engaging, high-end visual toy or background element where the dots elastically pull toward the user’s cursor on hover, and dramatically explode outward with gravity-based physics upon clicking.
Minimalist Canvas Animated Particle Background
demo & codeThe Minimalist Canvas Animated Particle Background is an ambient UI element that generates a field of drifting geometric shapes. It serves as a non-intrusive aesthetic layer for headers or landing pages, providing depth through motion. The system alternates between “bubbles” and spinning “lines” to create a technical yet organic atmosphere.
Shattering Image Gallery Transition
demo & codeThis is a Shattering Image Gallery Transition. It utilizes the WebGL API via Three.js to deconstruct 2D images into a matrix of 3D particles. Its function is to replace standard fade or slide slideshows with a highly cinematic, physics-based explosion effect, transitioning between photographs by blowing the current image apart to reveal the next one underneath.
Staggered Particle Blob Effect
demo & codeThis is a Staggered Particle Blob Effect. It clusters multiple DOM nodes into a cohesive, glowing entity that tracks cursor movement. Its function is to provide highly organic, procedural background interaction, replacing static canvases with an ecosystem of independent, mathematically linked elements.
Cosmic 3D Galaxy Button
demo & codeThis is a Cosmic 3D Galaxy Button. It replaces a standard solid color hover state with a dynamic, multi-layered particle system. Its function is to serve as a high-impact primary call-to-action, using spatial depth and global page illumination to draw maximum user focus.
Interactive Spectral 3D Ghost Effect
demo & codeThis is an Interactive Spectral 3D Ghost Effect. It utilizes Three.js and custom GLSL shaders to render a dynamic, mouse-tracking entity with analog signal decay. Its function is to serve as an immersive focal point or an interactive background element. The effect effectively bridges direct user input with procedural visual storytelling.
Sparkling Gradient Text Highlight
demo & codeTypography on the web often suffers from a lack of vitality. We treat words as static information, ignoring their potential to convey wonder. This component injects a sense of “magic” into the reading experience. By combining a kinetic gradient with a randomized particle system, we create a focal point that breathes. It is not just a highlight; it is a celebration of the message, designed to captivate the user’s peripheral vision without overwhelming the content.
Interactive Typographic Wave Footer
demo & codeThis Interactive Typographic Wave Footer combines generative art with functional UI design. It features a field of horizontal lines that behave like a liquid surface, reacting to the user’s cursor with a satisfying ripple effect. Hidden within the wave structure is a 3D-like topographic representation of text (“DICH”), generated by mapping pixel brightness from an off-screen canvas to the vertical position of the lines. It’s a sophisticated way to add depth and interactivity to a page footer or hero section.
WebGL Voronoi Particle Transition
demo & codeThis WebGL Voronoi Particle Transition is a cutting-edge visual effect that reimagines the standard image slider. Instead of manipulating DOM elements or simple textures, it converts images into a massive system of particles (one for every pixel). During transitions, these particles are subjected to a mathematical storm driven by Voronoi diagrams, creating a liquid, swirling distortion effect that feels organic and computational.
Interactive 3D Falling Leaves Shader
demo & codeThis Interactive 3D Falling Leaves Shader is a sophisticated WebGL demonstration built with Three.js that showcases efficient rendering of thousands of unique objects. By utilizing InstancedMesh and custom GLSL shaders, it creates a stylized autumn tree where leaves respond to wind, sway realistically, and “die” (fall off) either randomly or through user interaction via raycasting.
GSAP Sparkle Generate Button
demo & codeThis GSAP Sparkle Generate Button adds a touch of magic to standard call-to-action elements. Designed for AI generation tools or creative apps, it features a sophisticated hover effect where particles (dots) spawn and float organically around the button. The animation is driven by GreenSock’s Physics2DPlugin, simulating gravity and velocity for a realistic “dust” movement.
Sparkle Generate Button
demo & codeThis Sparkle Generate Button adds a touch of delight to AI or creative tools. When hovered, the button doesn’t just change color - it emits a cloud of floating “sparkles” (particles) that drift and rotate. The effect is powered by CSS variables for performance, with a lightweight JavaScript snippet to randomize the particle paths, ensuring the animation feels organic and magical every time.
Rising Bubbles Particles Effect
demo & codeThis Rising Bubbles Particle Background utilizes the tsParticles library to create a soothing, fluid animation reminiscent of carbonated water or an underwater scene. By leveraging the HTML5 Canvas API through a high-level configuration object, it renders performant particles that spawn from the bottom of the viewport and grow until they “pop.”
Three.js Gradient
A Low Poly 3D planet visualization built with Three.js, featuring three rotating layers: a solid core, a wireframe shell, and a floating particle cloud.
See the Pen Three.js Gradient.
Bongo Cat Codes #2: Jamming
A playful recreation of the Bongo Cat meme using SVG and GSAP. It features complex timelines coordinating rapid paw movements, a randomized note particle system colored via CSS variables, and a scrolling terminal code effect using drawSVG logic.
See the Pen Bongo Cat Codes #2: Jamming.
Interactive Mandelbrot Particles
A psychedelic, “breathing” pattern of thousands of glowing dots leaving fading trails, forming recognizable fractal outlines in real-time, with color based on particle lifespan and position.
See the Pen Interactive Mandelbrot Particles.
Interactive Spotlight Effect
An interactive “spotlight” effect created with clip-path: circle(), whose position is controlled via CSS variables. JavaScript tracks the cursor and updates the variables inside a requestAnimationFrame loop for a smooth and performant animation.
See the Pen Interactive Spotlight Effect.
Interactive Fireworks with Babylon.js and CSS nth-child
An example of efficient resource management in Babylon.js - completed particle systems are tracked and completely removed from the scene with the dispose() method, preventing memory leaks.
Rain Particle Effect with HTML Canvas
This full-screen particle system uses the Canvas 2D context to draw short-lived, low-alpha rain streaks, relying on requestAnimationFrame for a performance-optimized background animation.
See the Pen Rain Particle Effect with HTML Canvas.
Dynamic Twinkling Particle System with Vanilla JS and Canvas
Dive into an interactive demo using pure JavaScript and Canvas 2D, where mouse movement creates a magnetic field for particles, and clicking triggers an explosion effect, implementing complex element creation and destruction logic.
Particle Teapot with Glow Effects
A spectacular procedural 3D model generation from points using shaders and textures to create a “twinkling” effect. The use of EffectComposer allows for layering multiple post-processing effects like Bloom and RGB Shift, enhancing the visual quality.
See the Pen Particle Teapot with Glow Effects.
Three.js Particle Morphing Animation
Powered by Three.js and Anime.js, this demo showcases complex particle morphing between six different shapes with smooth, procedurally generated transitions and customizable color schemes.
See the Pen Three.js Particle Morphing Animation.
Audio Visualization III using Web Audio API
This audio visualizer leverages the Web Audio API to extract frequency data, driving a real-time, responsive 3D starfield and waveform that reacts intensely to the music’s average volume.
See the Pen Audio Visualization III using Web Audio API.