Skip to content

Bundle-Anleitung

Diese Seite hilft dir, das passende tsParticles-Bundle auszuwaehlen und schnell einzurichten.

Paketvergleich

PaketIdeal fuerSetup-Stil
@tsparticles/basicSehr leichte SetupstsParticles + await loadBasic(tsParticles)
@tsparticles/slimDie meisten Websites/AppstsParticles + await loadSlim(tsParticles)
tsparticlesVollstaendiger offizieller Feature-Satz mit Engine-KontrolletsParticles + await loadFull(tsParticles)
@tsparticles/allAlle Features, schnelles PrototypingtsParticles + await loadAll(tsParticles)
@tsparticles/confettiKonfetti-Effekte mit einem Aufrufawait confetti(options)
@tsparticles/fireworksFeuerwerk-Effekte mit einem Aufrufawait fireworks(options)
@tsparticles/particlesEinfache API fuer Partikel-Hintergruendeawait particles(options)

Bundle-Anleitungen

Installation

Installiere den Paketpfad, der zu deinem Anwendungsfall passt.

bash
pnpm add @tsparticles/engine @tsparticles/basic
pnpm add @tsparticles/engine @tsparticles/slim
pnpm add @tsparticles/engine tsparticles
pnpm add @tsparticles/engine @tsparticles/all
pnpm add @tsparticles/confetti
pnpm add @tsparticles/fireworks
pnpm add @tsparticles/particles

Brauchst du CDN-Links und weitere Package-Manager-Varianten?

Setup-Beispiele

Engine + Loader-Bundles (basic, slim, full, all)

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

await loadSlim(tsParticles);

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

Fuer die anderen Presets tauschst du nur Import/Funktion des Loaders:

  • @tsparticles/basic -> loadBasic
  • tsparticles -> loadFull
  • @tsparticles/all -> loadAll

Fokussierte APIs (confetti, fireworks, particles)

ts
import { confetti } from "@tsparticles/confetti";
import { fireworks } from "@tsparticles/fireworks";
import { particles } from "@tsparticles/particles";

await confetti({ count: 80, spread: 60 });
await fireworks({ sounds: false });
await particles({ count: 100, links: true });

Diese APIs sind ideal, wenn du schnell integrieren willst, ohne viele Engine-Plugins manuell zu verdrahten.

Praktische Auswahlregeln

  1. Starte in den meisten Projekten mit @tsparticles/slim.
  2. Nutze @tsparticles/basic, wenn Bundle-Groesse oberste Prioritaet hat und die Features einfach sind.
  3. Nutze tsparticles, wenn du eine full Basis mit vielen Features und loadFull brauchst.
  4. Nutze @tsparticles/all fuer Prototyping oder wenn du sofort viele Features brauchst.
  5. Nutze @tsparticles/confetti, @tsparticles/fireworks oder @tsparticles/particles, wenn deine UI einen gezielten Effekt mit minimalem Setup braucht.

Verwandte Seiten