Wrappers
Esta pagina e o hub de wrappers. Use-a para escolher o pacote certo e, em seguida, abra a pagina dedicada para detalhes de instalacao e uso.
Pasta de origem: https://github.com/tsparticles/tsparticles/tree/main/wrappers
Paginas de wrappers
Mais usados primeiro
Ecossistema React
Ecossistema Vue
Outros (ordem alfabetica)
Angular ConfettiAngular FireworksAstroEmberInfernojQueryLitPreactQwikRiotSolidWeb ComponentsWordPress
Fluxo comum de integracao
Independente do framework:
- instale wrapper +
@tsparticles/engine - carregue os recursos uma vez (
@tsparticles/slim,@tsparticles/all, ou plugins personalizados) - renderize o componente wrapper com opcoes
Wrappers oficiais (ordem alfabetica)
Regra de ordenacao desta secao:
ordem alfabetica por nome de pacote
excecoes explicitas em notas de mapeamento (por exemplo, WordPress exige instalacao 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 de plugin jQuery
Docs: https://github.com/tsparticles/tsparticles/tree/main/wrappers/jquery#readme - guia local:/guide/wrappers-jquery@tsparticles/lit: pacote de componente Lit
Source: https://github.com/tsparticles/tsparticles/tree/main/wrappers/lit - guia local:/guide/wrappers-lit@tsparticles/nextjs: wrapper 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: pacote oficial de plugin 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 e Elementor
@tsparticles/wordpresse o pacote oficial do plugin e requer um setup completo de WordPress.- Elementor nao possui plugin
tsParticlesoficial e independente. - O README referencia a integracao via Premium Addons for Elementor: https://premiumaddons.com/particles-section-addon-for-elementor-page-builder/
Mapeamento wrapper para demo
Use esta matriz para pular rapidamente de um package wrapper para uma demo executavel do monorepo.
Regra de ordenacao desta tabela:
- ordem alfabetica por nome de package wrapper
- excecao explicita para wrappers que nao se aplicam a demo (
@tsparticles/wordpress)
Pasta fonte de demos: https://github.com/tsparticles/tsparticles/tree/main/demo
| Package wrapper | Projeto 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 | nao aplicavel (requer instalacao completa do WordPress) |
angular-confetti | demo/angular |
angular-fireworks | demo/angular |
Padroes 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>
);
}Funcao 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);
}Inicializacao unica no 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);
});
}