Wrappers
Esta pagina es el hub de wrappers. Usala para elegir el paquete correcto y luego abre la pagina dedicada para ver detalles de instalacion y uso.
Carpeta fuente: https://github.com/tsparticles/tsparticles/tree/main/wrappers
Paginas de wrappers
Los mas usados
Ecosistema React
Ecosistema Vue
Otros (orden alfabetico)
Angular ConfettiAngular FireworksAstroEmberInfernojQueryLitPreactQwikRiotSolidWeb ComponentsWordPress
Flujo comun de integracion
Sin importar el framework:
- instala el wrapper +
@tsparticles/engine - carga las features una vez (
@tsparticles/slim,@tsparticles/all, o plugins personalizados) - renderiza el componente wrapper con opciones
Wrappers oficiales (orden alfabetico)
Regla de orden para esta seccion:
orden alfabetico por nombre de paquete
las excepciones se indican en notas de mapping (por ejemplo WordPress requiere una instalacion completa)
@tsparticles/angular: wrapper de componente Angular (<ngx-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular#readme - guia local:/guide/wrappers-angular@tsparticles/astro: wrapper de componente Astro
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/astro#readme - guia local:/guide/wrappers-astro@tsparticles/ember: wrapper de Ember
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/ember#readme - guia local:/guide/wrappers-ember@tsparticles/inferno: wrapper de componente Inferno
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/inferno#readme - guia local:/guide/wrappers-inferno@tsparticles/jquery: wrapper plugin de jQuery
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/jquery#readme - guia local:/guide/wrappers-jquery@tsparticles/lit: paquete de componente Lit
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/lit - guia local:/guide/wrappers-lit@tsparticles/nextjs: wrapper de Next.js sobre@tsparticles/react
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nextjs#readme - guia local:/guide/wrappers-nextjs@tsparticles/nuxt2: modulo Nuxt 2 (registro client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt2#readme - guia local:/guide/wrappers-nuxt2@tsparticles/nuxt3: modulo Nuxt 3 (registro client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt3#readme - guia local:/guide/wrappers-nuxt3@tsparticles/nuxt4: modulo Nuxt 4 (registro client-side)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/nuxt4#readme - guia local:/guide/wrappers-nuxt4@tsparticles/preact: wrapper de componente Preact
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/preact#readme - guia local:/guide/wrappers-preact@tsparticles/qwik: wrapper de componente Qwik
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/qwik#readme - guia local:/guide/wrappers-qwik@tsparticles/react: wrapper de componente React
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/react#readme - guia local:/guide/wrappers-react@tsparticles/riot: wrapper de Riot
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/riot#readme - guia local:/guide/wrappers-riot@tsparticles/solid: wrapper de componente Solid
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/solid#readme - guia local:/guide/wrappers-solid@tsparticles/svelte: wrapper de componente Svelte
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/svelte#readme - guia local:/guide/wrappers-svelte@tsparticles/vue2: wrapper de componente Vue 2
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue2#readme - guia local:/guide/wrappers-vue2@tsparticles/vue3: wrapper de componente Vue 3
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/vue3#readme - guia local:/guide/wrappers-vue3@tsparticles/webcomponents: wrapper de Web Components (<web-particles />)
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/webcomponents#readme - guia local:/guide/wrappers-webcomponents@tsparticles/wordpress: paquete oficial del plugin de WordPress
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/wordpress - guia local:/guide/wrappers-wordpressangular-confetti: wrapper Angular para@tsparticles/confetti
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-confetti#readme - guia local:/guide/wrappers-angular-confettiangular-fireworks: wrapper Angular para@tsparticles/fireworks
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular-fireworks#readme - guia local:/guide/wrappers-angular-fireworks
Notas sobre WordPress y Elementor
@tsparticles/wordpresses el paquete oficial del plugin y requiere un setup completo de WordPress.- Elementor no tiene un plugin
tsParticlesoficial e independiente. - El README referencia la integracion mediante Premium Addons for Elementor: https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/
Mapping wrapper a demo
Usa esta matriz rapida para saltar de un package wrapper a una demo ejecutable del monorepo.
Regla de orden para esta tabla:
- orden alfabetico por nombre de package wrapper
- excepcion explicita para wrappers no aplicables en demo (
@tsparticles/wordpress)
Carpeta fuente de demos: https://github.com/tsparticles/tsparticles/tree/main/demo
| Package wrapper | Proyecto demo |
|---|---|
@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 | no aplica (requiere instalacion completa de WordPress) |
angular-confetti | demo/angular |
angular-fireworks | demo/angular |
Patrones minimos
Provider estilo 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>
);
}Funcion de registro estilo 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);
}Inicializacion unica en 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);
});
}