Wrapper
Diese Seite ist der Wrapper-Hub. Nutze sie, um das richtige Paket zu finden, und offne danach die jeweilige Seite fur Installation und Verwendung.
Quellordner: https://github.com/tsparticles/tsparticles/tree/main/wrappers
Wrapper-Seiten
Zuerst die beliebtesten
React-Okosystem
Vue-Okosystem
Weitere (alphabetisch)
Angular ConfettiAngular FireworksAstroEmberInfernojQueryLitPreactQwikRiotSolidWeb ComponentsWordPress
Gemeinsamer Integrationsablauf
Unabhangig vom Framework:
- Wrapper +
@tsparticles/engineinstallieren - Features einmal laden (
@tsparticles/slim,@tsparticles/all, oder eigene Plugins) - Wrapper-Komponente mit Optionen rendern
Offizielle Wrapper (alphabetisch)
Sortierregel fur diesen Abschnitt:
alphabetisch nach Paketname
Ausnahmen werden in den Mapping-Notizen explizit genannt (z. B. WordPress braucht eine vollstandige Installation)
@tsparticles/angular: Angular-Komponenten-Wrapper (<ngx-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular#readme - lokaler Guide:/guide/wrappers-angular@tsparticles/astro: Astro-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/astro#readme - lokaler Guide:/guide/wrappers-astro@tsparticles/ember: Ember-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/ember#readme - lokaler Guide:/guide/wrappers-ember@tsparticles/inferno: Inferno-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/inferno#readme - lokaler Guide:/guide/wrappers-inferno@tsparticles/jquery: jQuery-Plugin-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/jquery#readme - lokaler Guide:/guide/wrappers-jquery@tsparticles/lit: Lit-Komponenten-Paket
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/lit - lokaler Guide:/guide/wrappers-lit@tsparticles/nextjs: Next.js-Wrapper um@tsparticles/react
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nextjs#readme - lokaler Guide:/guide/wrappers-nextjs@tsparticles/nuxt2: Nuxt-2-Modul (clientseitige Registrierung)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt2#readme - lokaler Guide:/guide/wrappers-nuxt2@tsparticles/nuxt3: Nuxt-3-Modul (clientseitige Registrierung)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt3#readme - lokaler Guide:/guide/wrappers-nuxt3@tsparticles/nuxt4: Nuxt-4-Modul (clientseitige Registrierung)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt4#readme - lokaler Guide:/guide/wrappers-nuxt4@tsparticles/preact: Preact-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/preact#readme - lokaler Guide:/guide/wrappers-preact@tsparticles/qwik: Qwik-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/qwik#readme - lokaler Guide:/guide/wrappers-qwik@tsparticles/react: React-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/react#readme - lokaler Guide:/guide/wrappers-react@tsparticles/riot: Riot-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/riot#readme - lokaler Guide:/guide/wrappers-riot@tsparticles/solid: Solid-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/solid#readme - lokaler Guide:/guide/wrappers-solid@tsparticles/svelte: Svelte-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/svelte#readme - lokaler Guide:/guide/wrappers-svelte@tsparticles/vue2: Vue-2-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue2#readme - lokaler Guide:/guide/wrappers-vue2@tsparticles/vue3: Vue-3-Komponenten-Wrapper
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue3#readme - lokaler Guide:/guide/wrappers-vue3@tsparticles/webcomponents: Web-Components-Wrapper (<web-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/webcomponents#readme - lokaler Guide:/guide/wrappers-webcomponents@tsparticles/wordpress: offizielles WordPress-Plugin-Paket
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/wordpress - lokaler Guide:/guide/wrappers-wordpressangular-confetti: Angular-Wrapper fur@tsparticles/confetti
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-confetti#readme - lokaler Guide:/guide/wrappers-angular-confettiangular-fireworks: Angular-Wrapper fur@tsparticles/fireworks
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-fireworks#readme - lokaler Guide:/guide/wrappers-angular-fireworks
Hinweise zu WordPress und Elementor
@tsparticles/wordpressist das offizielle Plugin-Paket und braucht ein vollstandiges WordPress-Setup.- Fur Elementor gibt es kein offizielles, eigenstandiges
tsParticles-Plugin. - Das README verweist auf die Integration uber Premium Addons for Elementor: https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/
Wrapper-zu-Demo-Mapping
Nutze diese Matrix, um schnell vom Wrapper-Paket zur lauffahigen Monorepo-Demo zu springen.
Sortierregel fur diese Tabelle:
- alphabetisch nach Wrapper-Paketname
- explizite Ausnahme fur nicht demo-fahige Wrapper (
@tsparticles/wordpress)
Quellordner fur Demos: https://github.com/tsparticles/tsparticles/tree/main/demo
| Wrapper-Paket | Demo-Projekt |
|---|---|
@tsparticles/angular | demo/angular |
@tsparticles/astro | demo/astro |
@tsparticles/ember | demo/ember |
@tsparticles/inferno | demo/inferno |
@tsparticles/jquery | demo/jquery |
@tsparticles/lit | demo/lit |
@tsparticles/nextjs | demo/nextjs, demo/nextjs-legacy |
@tsparticles/nuxt2 | demo/nuxt2 |
@tsparticles/nuxt3 | demo/nuxt3 |
@tsparticles/nuxt4 | demo/nuxt4 |
@tsparticles/preact | demo/preact |
@tsparticles/qwik | demo/qwik |
@tsparticles/react | demo/react |
@tsparticles/riot | demo/riot |
@tsparticles/solid | demo/solid |
@tsparticles/svelte | demo/svelte, demo/svelte-kit |
@tsparticles/vue2 | demo/vue2 |
@tsparticles/vue3 | demo/vue3 |
@tsparticles/webcomponents | demo/webcomponents |
@tsparticles/wordpress | nicht anwendbar (vollstandige WordPress-Installation) |
angular-confetti | demo/angular |
angular-fireworks | demo/angular |
Minimale Patterns
Provider im React / Next.js-Stil
import Particles, { ParticlesProvider } from "@tsparticles/react";
import type { Engine } from "@tsparticles/engine";
import { loadSlim } from "@tsparticles/slim";
const init = async (engine: Engine): Promise<void> => {
await loadSlim(engine);
};
export function Background() {
return (
<ParticlesProvider init={init}>
<Particles id="tsparticles" options={{ particles: { move: { enable: true } } }} />
</ParticlesProvider>
);
}Registrierungsfunktion im Vue / Nuxt-Stil
import type { Engine } from "@tsparticles/engine";
export async function registerParticles(engine: Engine): Promise<void> {
const [{ loadSlim }] = await Promise.all([import("@tsparticles/slim")]);
await loadSlim(engine);
}Einmalige Initialisierung in Angular
import { NgParticlesService } from "@tsparticles/angular";
import { loadSlim } from "@tsparticles/slim";
constructor(private readonly particlesService: NgParticlesService) {}
ngOnInit(): void {
void this.particlesService.init(async engine => {
await loadSlim(engine);
});
}