Options
All
  • Public
  • Public/Protected
  • All
Menu

The Options interface, defines all the options that can be used by tsParticles

Options

property option type example notes
autoPlay boolean true / false
background object See Background options here
backgroundMask object See Background Mask options here
detectRetina boolean true / false Replaces the old retina_detect property
fpsLimit number 30 Defaults to 30, replaces the old fps_limit property
fullScreen object See Full Screen options here
infection object See Infection options here
interactivity object See Interactivity options here
manualParticles array An array of Manual Particles object. See Manual Particles documentation here
motion object See Motion options here
particles object See Particles options here
pauseOnBlur boolean true / false Pauses the animations when the page isn't on foreground
pauseOnOutsideViewport boolean true / false Pauses the animations when the element is out of the viewport
preset string / array "basic"
[ "basic", "60fps" ]
You can use this property to load one or more presets for focusing on important properties and not all config. You can find presets on npm here
themes array It's an array of Theme object, you can see the structure here

Plugins

These options are not used by slim bundle

property option type example notes
absorbers object / array See Absorbers options here
emitters object / array See Emitter options here
polygonMask object See Particles options here

Hierarchy

  • IOptions

Implemented by

Indexable

[name: string]: unknown

More custom options for external plugins or customizations

Index

Properties

autoPlay

autoPlay: boolean

Sets if the animations should start automatically or manually

background

background: IBackground

Background options, these background options will be used to the canvas element, they are all CSS properties

backgroundMask

backgroundMask: IBackgroundMask

Background Mask options, what's behind the canvas will become hidden and particles will uncover it

backgroundMode

backgroundMode: IFullScreen

Sets the animated background mode for particles canvas bringing it to the back

deprecated

use the new fullScreen instead

detectRetina

detectRetina: boolean

Enables the retina detection, if disabled the ratio used by canvas will be always 1 and not the device setting.

fpsLimit

fpsLimit: number

The FPS (Frame Per Second) limit applied to all particles animations.

fps_limit

fps_limit: number

The Frame Per Second limit applied to all particles animations.

deprecated

use the new fpsLimit instead

fullScreen

fullScreen: IFullScreen

Sets the animated background mode for particles canvas bringing it to the back

infection

infection: IInfection

The infection options

interactivity

interactivity: IInteractivity

The particles interaction options

manualParticles

manualParticles: IManualParticle[]

Particles inserted at load time with a specific position

motion

motion: IMotion

Handles user's preferences about motion

particles

particles: IParticles

The particles options

pauseOnBlur

pauseOnBlur: boolean

Enables or disabled the animation on window blur

pauseOnOutsideViewport

pauseOnOutsideViewport: boolean

Enable or disabled the animation if the element is outside the viewport

Optional preset

preset: SingleOrMultiple<string>

This property will be used to add specified presets to the options

responsive

responsive: IResponsive[]

This sets custom options based on canvas size

retina_detect

retina_detect: boolean

Enables the retina detection, if disabled the ratio used by canvas will be always 1 and not the device setting.

deprecated

use the new detectRetina instead

themes

themes: ITheme[]

User-defined themes that can be retrieved by the particles Container