Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

tsparticles

> 前端框架
Open source

tsParticles - Easily create highly customizable JavaScript particles effects, confetti explosions and fireworks animations and use them as animated backgrounds

8.9K stars0 likes1 views
WebsiteGitHub

About

tsParticles - Easily create highly customizable JavaScript particles effects, confetti explosions and fireworks animations and use them as animated backgrounds

tsParticles - TypeScript Particles

A lightweight TypeScript library for creating particles. Dependency free (*), browser ready and compatible with React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.js, Solid.js, and Web Components

Table of Contents

  • tsParticles - TypeScript Particles
    • Table of Contents
    • Do you want to use it on your website?
    • Start here in 2 minutes
    • Library installation
      • Hosting / CDN
        • jsDelivr
        • cdnjs
        • unpkg
      • npm
      • yarn
      • pnpm
        • Import and require
      • Usage
    • Official components for some of the most used frameworks
      • Angular
        • @tsparticles/angular
      • Astro
        • @tsparticles/astro
      • Ember.js
        • @tsparticles/ember
      • Inferno
        • @tsparticles/inferno
      • jQuery
        • @tsparticles/jquery
      • Preact
        • @tsparticles/preact
      • Qwik
        • @tsparticles/qwik
      • ReactJS
        • @tsparticles/nextjs
        • @tsparticles/react
      • RiotJS
        • @tsparticles/riot
      • SolidJS
        • @tsparticles/solid
      • Svelte
        • @tsparticles/svelte
      • VueJS 2.x
        • @tsparticles/nuxt2
        • @tsparticles/vue2
      • VueJS 3.x
        • @tsparticles/nuxt3
        • @tsparticles/nuxt4
        • @tsparticles/vue3
      • Web Components
        • @tsparticles/webcomponents
      • WordPress
        • @tsparticles/wordpress
      • Elementor
    • Presets
      • Ambient
      • Big Circles
      • Bubbles
      • Confetti
      • Confetti Cannon
      • Confetti Explosions
      • Confetti Falling
      • Confetti Parade
      • Party
      • Fire
      • Firefly
      • Fireworks
      • Fountain
      • Hyperspace
      • Links
      • Sea Anemone
      • Snow
      • Squares
      • Stars
      • Triangles
    • Templates and Resources
    • Demo / Generator
    • Video Tutorials
      • Characters as particles
      • Polygon mask
      • Animated stars
      • Nyan cat flying on scrolling stars
      • Snow particles
      • Background Mask particles
    • Options
    • Want to see it in action and try it?
    • Migrating from Particles.js
    • Plugins/Customizations
    • Dependency Graph

Do you want to use it on your website?

_Documentation and Development references here _

This library is available on two of the most popular CDNs and it's easy and ready to use, if you were using particles.js it's even easier.

You'll find the instructions below, with all the links you need, and don't be scared by TypeScript, it's just the source language.

The output files are just JavaScript.

CDNs and npm have all the sources you need in Javascript, a bundle browser ready (tsparticles.engine.min.js), and all files splitted for import syntax.

If you are interested there are some simple instructions just below to guide you to migrate from the old particles.js library.

Start here in 2 minutes

If you are new to tsParticles, this path is usually the fastest:

  1. Install @tsparticles/engine and @tsparticles/slim
  2. Load the slim bundle once
  3. Start with a small config and iterate
javascript
import { tsParticles } from "@tsparticles/engine";
import { loadSlim } from "@tsparticles/slim";

await loadSlim(tsParticles);

await tsParticles.load({
  id: "tsparticles",
  options: {
    background: {
      color: "#0d1117",
    },
    particles: {
      move: {
        enable: true,
      },
      number: {
        value: 60,
      },
    },
  },
});

Useful docs for the next step:

  • Docs home: https://particles.js.org/docs/
  • Options guide: https://github.com/tsparticles/tsparticles/blob/main/markdown/Options.md
  • Migration guide: https://github.com/tsparticles/tsparticles/blob/main/markdown/pjsMigration.md
  • Presets catalog: https://github.com/tsparticles/presets

Quick checklist

  • Install @tsparticles/engine and one bundle (@tsparticles/slim is the common default)
  • Load the bundle before calling tsParticles.load(...)
  • Start from a small config, then extend incrementally

Choose your quick-start path

  • I want fewer dependencies: use @tsparticles/engine + only needed feature packages
  • I want the easiest default: use @tsparticles/slim
  • I need everything enabled: use @tsparticles/all

Common pitfalls

  • Loading options that require plugins before loading those plugin packages
  • Starting with very high particle counts before checking FPS
  • Mixing legacy snake_case keys with modern camelCase options

Related docs

  • Main docs: https://particles.js.org/docs/
  • Root options guide: https://github.com/tsparticles/tsparticles/blob/main/markdown/Options.md
  • Migration guide: https://github.com/tsparticles/tsparticles/blob/main/markdown/pjsMigration.md

Library installation

Hosting / CDN

Please use these hosts or your own to load tsParticles on your projects

jsDelivr

cdnjs

unpkg

https://unpkg.com/@tsparticles/confetti/ https://unpkg.com/@tsparticles/particles/ https://unpkg.com/@tsparticles/engine/ https://unpkg.com/@tsparticles/fireworks/ https://unpkg.com/@tsparticles/basic/ https://unpkg.com/@tsparticles/slim/ https://unpkg.com/tsparticles/ https://unpkg.com/@tsparticles/all/


npm

tsParticles Confetti

tsParticles Particles

tsParticles Engine

tsParticles Fireworks

tsParticles Basic

tsParticles Slim

tsParticles

tsParticles All

bash
npm install @tsparticles/engine

yarn

bash
yarn add @tsparticles/engine

pnpm

bash
pnpm install @tsparticles/engine

Import and require

javascript
const tsParticles = require("@tsparticles/engine");

// or

import { tsParticles } from "@tsparticles/engine";

The imported tsParticles is the same instance you have when including the script in the page using the <script> tag.


Usage

Load tsParticles and configure the particles: index.html

xml

<script src="tsparticles.engine.min.js"></script>

app.js

…

Official components for some of the most used frameworks

Angular

@tsparticles/angular

Instructions available here

Astro

@tsparticles/astro

Instructions available here

Ember.js

@tsparticles/ember

Instructions available here

Inferno

@tsparticles/inferno

Instructions available here

jQuery

@tsparticles/jquery

Instructions available here

Preact

@tsparticles/preact

Instructions available here

Qwik

@tsparticles/qwik

Instructions available here

ReactJS

@tsparticles/nextjs

Instructions available here

@tsparticles/react

Instructions available here

RiotJS

@tsparticles/riot

Instructions available here

SolidJS

@tsparticles/solid

Instructions available here

Svelte

@tsparticles/svelte

Instructions available here

VueJS 2.x

@tsparticles/nuxt2

Instructions available here

@tsparticles/vue2

Instructions available here

VueJS 3.x

@tsparticles/nuxt3

Instructions available here

@tsparticles/nuxt4

Instructions available here

@tsparticles/vue3

Instructions available here

Web Components

@tsparticles/webcomponents

Instructions available here

WordPress

`@tsparticles/wo

Issues· 20 open

View all issuesOpen on GitHub
  • #2073

    Dependency Dashboard

    Updated Jul 27, 2026
  • #5852

    Docs site: ad density on documentation pages is hurting readability

    triageUpdated Jun 15, 2026
  • #4982

    Change the onClick event to handle both mouseUp and mouseDown

    enhancementhelp wantedgood first issueup-for-grabspluginUpdated Feb 24, 2025
  • #208

    Fluid output

    documentationenhancementhelp wantedup-for-grabspluginUpdated Feb 18, 2025
  • #4965

    Improve Touch events support

    documentationenhancementhelp wantedgood first issueup-for-grabsUpdated Feb 18, 2025
  • #4987

    Add easing functions to particles values animations

    documentationenhancementhelp wantedgood first issueup-for-grabsUpdated Feb 18, 2025
  • #5336

    Custom Color Transitions

    documentationenhancementhelp wantedgood first issueup-for-grabsUpdated Feb 18, 2025
  • #5320

    Absorber Split on Click or Size limit reached

    enhancementhelp wantedgood first issueup-for-grabspluginUpdated Mar 15, 2024

> Tags

TypeScript2dangularanimationsbg

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架