Wrappers
Questa pagina e l'hub dei wrapper. Usala per scegliere il pacchetto giusto, poi apri la pagina dedicata per dettagli su installazione e utilizzo.
Cartella sorgente: https://github.com/tsparticles/tsparticles/tree/main/wrappers
Pagine wrapper
I piu usati
Ecosistema React
Ecosistema Vue
Altri (ordine alfabetico)
Angular ConfettiAngular FireworksAstroEmberInfernojQueryLitPreactQwikRiotSolidWeb ComponentsWordPress
Flusso di integrazione comune
Indipendentemente dal framework:
- installa wrapper +
@tsparticles/engine - carica le feature una sola volta (
@tsparticles/slim,@tsparticles/allo plugin custom) - renderizza il componente wrapper con le opzioni
Wrapper ufficiali (ordine alfabetico)
Regole di ordinamento:
ordine alfabetico per nome pacchetto
eccezioni esplicitate nelle note di mapping (per esempio WordPress richiede un'installazione WordPress completa)
@tsparticles/angular: wrapper componente Angular (<ngx-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular#readme - guida locale:/guide/wrappers-angular@tsparticles/astro: wrapper componente Astro
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/astro#readme - guida locale:/guide/wrappers-astro@tsparticles/ember: wrapper Ember
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/ember#readme - guida locale:/guide/wrappers-ember@tsparticles/inferno: wrapper componente Inferno
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/inferno#readme - guida locale:/guide/wrappers-inferno@tsparticles/jquery: wrapper plugin jQuery
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/jquery#readme - guida locale:/guide/wrappers-jquery@tsparticles/lit: pacchetto componente Lit
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/lit - guida locale:/guide/wrappers-lit@tsparticles/nextjs: wrapper Next.js basato su@tsparticles/react
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nextjs#readme - guida locale:/guide/wrappers-nextjs@tsparticles/nuxt2: modulo Nuxt 2 (registrazione client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt2#readme - guida locale:/guide/wrappers-nuxt2@tsparticles/nuxt3: modulo Nuxt 3 (registrazione client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt3#readme - guida locale:/guide/wrappers-nuxt3@tsparticles/nuxt4: modulo Nuxt 4 (registrazione client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt4#readme - guida locale:/guide/wrappers-nuxt4@tsparticles/preact: wrapper componente Preact
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/preact#readme - guida locale:/guide/wrappers-preact@tsparticles/qwik: wrapper componente Qwik
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/qwik#readme - guida locale:/guide/wrappers-qwik@tsparticles/react: wrapper componente React
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/react#readme - guida locale:/guide/wrappers-react@tsparticles/riot: wrapper Riot
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/riot#readme - guida locale:/guide/wrappers-riot@tsparticles/solid: wrapper componente Solid
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/solid#readme - guida locale:/guide/wrappers-solid@tsparticles/svelte: wrapper componente Svelte
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/svelte#readme - guida locale:/guide/wrappers-svelte@tsparticles/vue2: wrapper componente Vue 2
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue2#readme - guida locale:/guide/wrappers-vue2@tsparticles/vue3: wrapper componente Vue 3
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue3#readme - guida locale:/guide/wrappers-vue3@tsparticles/webcomponents: wrapper Web Components (<web-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/webcomponents#readme - guida locale:/guide/wrappers-webcomponents@tsparticles/wordpress: pacchetto plugin WordPress ufficiale
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/wordpress - guida locale:/guide/wrappers-wordpressangular-confetti: wrapper Angular per@tsparticles/confetti
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-confetti#readme - guida locale:/guide/wrappers-angular-confettiangular-fireworks: wrapper Angular per@tsparticles/fireworks
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-fireworks#readme - guida locale:/guide/wrappers-angular-fireworks
Note su WordPress ed Elementor
@tsparticles/wordpresse il pacchetto plugin ufficiale e richiede un setup WordPress completo.- Elementor non ha un plugin standalone ufficiale per
tsParticles. - Nel README l'integrazione e citata tramite Premium Addons for Elementor: https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/
Mapping wrapper -> demo
Usa questa matrice rapida per passare da un wrapper a una demo eseguibile nel monorepo.
Regole di ordinamento:
- ordine alfabetico per nome pacchetto wrapper
- eccezione esplicita per wrapper non applicabili alle demo (
@tsparticles/wordpress)
Source demo folder: https://github.com/tsparticles/tsparticles/tree/main/demo
| Wrapper package | Demo project |
|---|---|
@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 | not applicable (requires full WordPress installation) |
angular-confetti | demo/angular |
angular-fireworks | demo/angular |
Pattern minimi
Provider in stile React / Next.js
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>
);
}Funzione register in stile Vue / Nuxt
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);
}Inizializzazione una tantum 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);
});
}