Options

property option type example notes
autoPlay boolean true / false
background object See Background options {@link IBackground
backgroundMask object See Background Mask options {@link IBackgroundMask
detectRetina boolean true / false Replaces the old retina_detect property
duration number / range 60 / { min: 30, max: 90 } The particles effect duration in seconds
fpsLimit number 60 Defaults to 60, replaces the old fps_limit property
fullScreen object / boolean {@link IFullScreen} or true / false See Full Screen options {@link IFullScreen
interactivity object See Interactivity options {@link IInteractivity
manualParticles array An array of Manual Particles object. See Manual Particles documentation {@link IManualParticle
motion object See Motion options {@link IMotion
particles object See Particles options {@link IParticlesOptions
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"
[ "links", "confetti" ]
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
responsive array See Responsive options {@link IResponsive
themes array It's an array of Theme object, you can see the structure {@link ITheme

Plugins

These options are not part of the slim bundle

property option type example notes
absorbers object / array See Absorbers options {@link IAbsorber
emitters object / array See Emitter options {@link IEmitter
polygonMask object See Particles options {@link IPolygonMask

Hierarchy

  • Options

Implements

Indexable

[name: string]: unknown

Constructors

Properties

#container: Container
#engine: Engine
autoPlay: boolean

Sets if the animations should start automatically or manually

background: Background

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

backgroundMask: BackgroundMask

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

defaultDarkTheme?: string
defaultLightTheme?: string
detectRetina: boolean

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

duration: RangeValue

The Particles effect duration in seconds, then the container will be destroyed

fpsLimit: number

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

fullScreen: FullScreen

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

interactivity: Interactivity

The particles interaction options

manualParticles: ManualParticle[]

Particles inserted at load time with a specific position

motion: Motion

Handles user's preferences about motion

particles: ParticlesOptions

The particles options

pauseOnBlur: boolean

Enables or disabled the animation on window blur

pauseOnOutsideViewport: boolean

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

preset?: SingleOrMultiple<string>

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

responsive: Responsive[]

This sets custom options based on canvas size

style: RecursivePartial<CSSStyleDeclaration>
themes: Theme[]

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

zLayers: number

The maximum layers used in the z-axis

Accessors

  • get fps_limit(): number
  • Deprecated

    this property is obsolete, please use the new fpsLimit

    Returns number

  • set fps_limit(value: number): void
  • Deprecated

    this property is obsolete, please use the new fpsLimit

    Parameters

    • value: number

    Returns void

  • get retina_detect(): boolean
  • Deprecated

    this property is obsolete, please use the new retinaDetect

    Returns boolean

  • set retina_detect(value: boolean): void
  • Deprecated

    this property is obsolete, please use the new retinaDetect

    Parameters

    • value: boolean

    Returns void

Methods

  • Parameters

    • preset: string

    Returns void

  • Parameters

    • width: number
    • pxRatio: number
    • defaultOptions: IOptions

    Returns undefined | number

  • Parameters

    • Optional name: string

    Returns void