Skip to content

Installation

Diese Seite ubernimmt die Installationsmatrix aus dem Haupt-README von tsParticles.

Offizielle Referenz: https://github.com/tsparticles/tsparticles/blob/main/README.md#library-installation

Wähle deinen Weg

  • Schneller Standard: @tsparticles/engine + @tsparticles/slim
  • Leichteres Custom-Runtime: @tsparticles/engine + nur benotigte Plugins
  • Fokussierte APIs: @tsparticles/particles, @tsparticles/confetti oder @tsparticles/fireworks
  • Alle Features enthalten: @tsparticles/all

Hosting / CDN

Nutze einen dieser Anbieter (oder hoste die gebauten Dateien selbst).

jsDelivr

cdnjs

unpkg

Installation per Package-Manager

npm

bash
npm install @tsparticles/engine

yarn

bash
yarn add @tsparticles/engine

pnpm

bash
pnpm add @tsparticles/engine

Import und require

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

// or

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

Minimales Runtime-Setup (@tsparticles/slim)

ts
import { tsParticles } from "@tsparticles/engine";
import { loadSlim } from "@tsparticles/slim";

await loadSlim(tsParticles);

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

Verwandte Seiten

Legacy-Kompatibilitat

Wenn du alte particles.js-Integrationen migrierst, nutze das Kompatibilitatspaket: