Skip to content

Templates and Resources

tsParticles provides two categories of templates: scaffold templates (framework skeletons) and use-case templates (complete example applications).

Quick start with CLI

The easiest way to use any template is through the CLI:

bash
npm create tsparticles@latest

Or use a specific bundle directly:

bash
npm create particles@latest
npm create confetti@latest
npm create ribbons@latest

For non-interactive usage:

bash
npx tsparticles-create app my-project --template scaffold --framework react
npx tsparticles-create app my-project --template confetti --framework vanilla

Scaffold templates

Scaffold templates provide a minimal Vite + TypeScript project skeleton with tsParticles pre-configured. They are available for the following frameworks:

FrameworkCLI optionPackage
Vanilla--framework vanilla@tsparticles/template-scaffold
React--framework react@tsparticles/template-scaffold
Vue 3--framework vue3@tsparticles/template-scaffold
Angular--framework angular@tsparticles/template-scaffold
Svelte--framework svelte@tsparticles/template-scaffold
Solid--framework solid@tsparticles/template-scaffold

Example:

bash
npx tsparticles-create app my-react-app --template scaffold --framework react
cd my-react-app
npm install
npm run dev

Use-case templates

Use-case templates are complete example applications that demonstrate real-world tsParticles usage.

TemplateDescriptionCLI template namePackage
LoginLogin/register page with particle backgroundlogin@tsparticles/template-login
PortfolioPersonal portfolio with animated heroportfolio@tsparticles/template-portfolio
LandingMarketing landing page with impactful particleslanding@tsparticles/template-landing
Tic Tac ToeTic-tac-toe game with confetti celebrationtictactoe@tsparticles/template-tictactoe
ConfettiConfetti cannon democonfetti@tsparticles/template-confetti
RibbonsRibbon animation demoribbons@tsparticles/template-ribbons
ParticlesClassic particles.js-style demoparticles@tsparticles/template-particles

Example:

bash
npx tsparticles-create app my-portfolio --template portfolio --framework vanilla
cd my-portfolio
npm install
npm run dev

npm create wrappers

For bundle-specific templates, you can use dedicated npm create wrappers:

CommandTemplateFrameworkInstalled bundle
npm create tsparticles@latestInteractiveInteractiveUser choice
npm create particles@latestparticlesVanilla@tsparticles/particles
npm create confetti@latestconfettiVanilla@tsparticles/confetti
npm create ribbons@latestribbonsVanilla@tsparticles/ribbons

CLI reference

bash
tsparticles-create app [destination] [options]

Options:
  --template <name>     Template to use (scaffold|login|portfolio|landing|tictactoe|confetti|ribbons|particles)
  --framework <name>    Framework (vanilla|react|vue3|angular|svelte|solid)
  --skip-install        Skip npm install after scaffolding
  -h, --help            Display help