@tsparticles/particles

Minimal tsParticles particles bundle — lightweight particle engine without confetti or fireworks extras. Perfect for pure particle backgrounds. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, In
6,297,197 8,995
Install
npm install @tsparticles/particles
Latest Version:4.4.0
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: matteobruni

banner

tsParticles Particles Bundle

jsDelivr npmjs npmjs GitHub Sponsors

tsParticles particles bundle to create simple particle effects with a focused API.

Included Packages

Exposed API

The package API is centered on particles.

import { particles } from "@tsparticles/particles";

// Main API
const instance = await particles();
const byId = await particles("canvas-id", options);
const byOptions = await particles(options);

// Extra helpers
await particles.init();
const custom = await particles.create(canvas, options);

console.log(particles.version);

@tsparticles/particles does not expose tsParticles from its main entrypoint. If you need direct engine APIs, import them from @tsparticles/engine.

Installation

pnpm add @tsparticles/particles

Lazy entrypoint (loads dependencies on demand):

import { particles } from "@tsparticles/particles/lazy";

How to use it

import { particles } from "@tsparticles/particles";

const instance = await particles({
  count: 120,
  color: "#00f",
  links: true,
  linksColor: "#0ff",
  linksLength: 140,
  radius: 4,
  shape: ["circle", "square"],
});

instance?.pause();
instance?.play();
instance?.stop();

Custom canvas via particles.create

import { particles } from "@tsparticles/particles";

const canvas = document.getElementById("my-canvas") as HTMLCanvasElement;
await particles.create(canvas, { links: true });

Options

Main options (shallow overview):

  • count Number: particles amount (default: 80)
  • radius Number or RangeValue: particle radius (default: 3)
  • links Boolean: enable links between particles
  • linksLength Number: maximum link distance
  • speed Number or RangeValue: particle movement speed
  • collisions Boolean: enable particle collisions
  • opacity Number: particle opacity
  • shape String or Array<String>: particle shape type(s)
  • color String: particle color
  • linksColor String: link color

Returned instance methods

The resolved ParticlesInstance exposes:

  • pause()
  • play()
  • stop()

Common pitfalls

  • Calling particles before scripts are loaded in CDN usage
  • Assuming tsParticles is exported by @tsparticles/particles main entrypoint
  • Reusing the same id unintentionally (the package caches instances by id)

Related docs

Related Packages

@tsparticles/ribbons

tsParticles ribbons bundle — easily create animated ribbons, ribbon bursts and r...

2,502,144 8,995
@tsparticles/engine

Easily create highly customizable particle, confetti and fireworks animations an...

20,171,445 8,997
@tsparticles/basic

Basic tsParticles bundle — minimal core engine with only the essential features...

18,651,336 8,997
@tsparticles/slim

Slim tsParticles bundle — core engine with essential plugins, presets, and inter...

14,833,710 8,997
tsparticles

Full-featured tsParticles bundle — create stunning particle, confetti and firewo...

11,242,027 8,997

Version History

Version Released License
4.4.0 MIT
4.3.2 MIT
4.3.1 MIT
4.3.0 MIT
4.2.1 MIT
Pre-releases (4)
Version Released License
4.0.0-beta.17 MIT
4.0.0-beta.16 MIT
4.0.0-beta.15 MIT
4.0.0-beta.12 MIT