API Reference
The tsParticles API is organized into layers. Use this page to find the right section.
Quick Links
| Section | Description |
|---|---|
| Full API docs (typedoc) | Auto-generated reference for all packages |
| Engine | Core engine — Engine, Container, tsParticles instance |
| Options | Complete options interface tree |
| Container | Runtime container — play, pause, refresh, export |
| IPlugin | Plugin interface for custom extensions |
Engine
The @tsparticles/engine package exports the core classes:
tsParticles— global singleton instanceEngine— the engine class used to create and manage containersContainer— a single particle canvas instanceload— the main entry point for creating particles
Options
The options object is a plain TypeScript interface. Key nested types:
IOptions— root options (background, particles, interactivity, plugins)IParticlesOptions— per-particle options (move, shape, size, color, etc.)IInteractivity— click, hover, and scroll events + modes
Browse the Options Reference or the full Options type.
Container API
The Container class controls a running particle instance:
| Method | Description |
|---|---|
play() | Resume animation |
pause() | Stop animation |
refresh() | Destroy and re-create particles with current options |
export(type) | Export current frame as image/canvas blob |
addListener(event, cb) | Subscribe to container events |
Plugin System
tsParticles supports custom plugins, shapes, updaters, interactions, and paths.
Bundles
Choose the right import for your project:
| Bundle | Included |
|---|---|
@tsparticles/basic | Core + circle shape + color + size + opacity + move |
@tsparticles/slim | Basic + interactivity + polygons + images + emoji + stars |
tsparticles (full) | Slim + absorbers + emitters + trail + sounds + all shapes |
@tsparticles/all | Everything including ships + fireworks + confetti |
Package-level Dependency Graph.
