whatisgithub

What is particles.js?

vincentgarreau/particles.js — explained in plain English

Analysis updated 2026-06-20

30,192JavaScriptAudience · vibe coderComplexity · 1/5Setup · easy

In one sentence

A lightweight JavaScript library that adds animated, interactive floating particle effects to any web page background, controlled entirely through a JSON config file with no animation code required.

Mindmap

mindmap
  root((particles.js))
    What it does
      Animated particles
      Web backgrounds
      Mouse interactivity
    Configuration
      Colors and shapes
      Speed and size
      Click and hover
    Installation
      Script tag
      npm package
      CDN link
    Common uses
      Landing pages
      Portfolio sites
      Login screens
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a dynamic floating-particle background to a landing page or portfolio site without writing any animation code.

USE CASE 2

Configure particle colors, shapes, speed, and mouse interactivity through a JSON file to match your visual style.

USE CASE 3

Create a login screen or hero section where particles react to mouse hover or clicks.

What is it built with?

JavaScript

How does it compare?

vincentgarreau/particles.jsgooglechrome/lighthousegethomepage/homepage
Stars30,19230,15729,931
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity1/52/52/5
Audiencevibe coderdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

particles.js is a lightweight JavaScript library that adds animated, interactive floating particles to a web page background. You have likely seen this effect on websites where small dots or shapes drift around the screen, sometimes connecting with lines or reacting when you hover your mouse over them. This library makes it straightforward to add that visual effect without writing complex animation code yourself. To use it, you add one HTML element to your page, load the library script, and then point it at a JSON configuration file where you set all the visual details: how many particles appear, their color, shape (circles, triangles, polygons, stars, or custom images), size, speed, and direction of movement. You can also control interactivity, for example, particles can scatter away from the mouse cursor, grow larger when hovered, or new ones can appear when you click. The configuration is entirely data-driven, so no code changes are needed to adjust the look and feel. You would use this when building a landing page, portfolio site, or login screen where you want a dynamic, modern background effect without pulling in a large dependency. The library is written in JavaScript and can be installed via npm, included from a content delivery network, or added directly as a script tag in your HTML.

Copy-paste prompts

Prompt 1
Using particles.js, give me the HTML snippet and JSON config to add a dark background with small white dots connected by lines to my landing page.
Prompt 2
I want particles.js particles to scatter away from the mouse cursor on my portfolio homepage. Show me the exact interactivity config to enable that.
Prompt 3
Help me install particles.js via npm in my project and set up a star-shaped particle effect in a custom color.
Prompt 4
Using particles.js, create a config where clicking the screen spawns a burst of new particles that slowly drift away.

Frequently asked questions

What is particles.js?

A lightweight JavaScript library that adds animated, interactive floating particle effects to any web page background, controlled entirely through a JSON config file with no animation code required.

What language is particles.js written in?

Mainly JavaScript. The stack also includes JavaScript.

How hard is particles.js to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is particles.js for?

Mainly vibe coder.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.