Skip to content

Wrapper: @tsparticles/jquery ​

Official jQuery plugin wrapper for tsParticles.

Install ​

bash
pnpm add @tsparticles/jquery @tsparticles/engine @tsparticles/slim

Quick setup flow ​

  1. Install package and load it in your jQuery setup.
  2. Initialize features once using slim/all as needed.
  3. Apply plugin on target element with options.

プラグインは選択した各 DOM 要素に直接マウントするため、要素に id を付ける必要はありません。

js
const container = await $(".particles-background").particles().load(options);

同じ要素選択を使って、.ajax(url) で JSON URL からオプションを読み込むこともできます。

Monorepo references ​

Readme ​