ラッパー: @tsparticles/react
tsParticles の公式 React ラッパー。
インストール
bash
pnpm add @tsparticles/react @tsparticles/engine @tsparticles/slim簡単なセットアップの流れ
- ラッパー + エンジン + ローダー パッケージをインストールします。
ParticlesProviderおよびloadSlimを使用して 1 回初期化します。- 型指定されたオプションを使用して
Particlesコンポーネントをレンダリングします。
モノリポジトリ参照
- パッケージフォルダー: https://github.com/tsparticles/tsparticles/tree/main/wrappers/react
- デモアプリ: https://github.com/tsparticles/tsparticles/tree/main/demo/react
