GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tsparticles/solid: Solid.js tsParticles official component

This repository was archived by the owner on Apr 15, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

76 Commits
76 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.husky
.husky
 
 
apps/solid
apps/solid
 
 
components/solid
components/solid
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lerna.json
lerna.json
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
renovate.json
renovate.json
 
 

Repository files navigation

banner

@tsparticles/solid

npm npm GitHub Sponsors

Official tsParticles solid component

Slack Discord Telegram

tsParticles Product Hunt

Installation

npm install @tsparticles/solid

or

yarn add @tsparticles/solid

How to use

Code

Examples:

Remote url

import Particles from "@tsparticles/solid";

function App() {
    const [ init, setInit ] = createSignal(false);

    createEffect(() => {
        if (init()) {
            return;
        }

        initParticlesEngine(async (engine) => {
            // this loads the tsparticles package bundle, it's the easiest method for getting everything ready
            // starting from v2 you can add only the features you need reducing the bundle size
            await loadFull(engine);
        }).then(() => {
            setInit(true);
        })
    });

    return (
        <div class="App">
            {init() && <Particles
                id="tsparticles"
                init={particlesInit}
                url="https://foo.bar/particles.json"
            />}
        </div>
    );
}

Options object

import Particles from "@tsparticles/solid";

function App() {
    const [ init, setInit ] = createSignal(false);

    createEffect(() => {
        if (init()) {
            return;
        }

        initParticlesEngine(async (engine) => {
            // this loads the tsparticles package bundle, it's the easiest method for getting everything ready
            // starting from v2 you can add only the features you need reducing the bundle size
            await loadFull(engine);
        }).then(() => {
            setInit(true);
        })
    });

    return (
        <div class="App">
            {init() && <Particles
                id="tsparticles"
                init={particlesInit}
                options={{
                    background: {
                        color: "#000",
                    },
                    fullScreen: {
                        enable: true,
                    },
                }}
            />}
        </div>
    );
}

Props

Prop Type Definition
id string The id of the element.
width string The width of the canvas.
height string The height of the canvas.
options object The options of the particles instance.
url string The remote options url, called using an AJAX request
style object The style of the canvas element.
className string The class name of the canvas wrapper.
canvasClassName string the class name of the canvas.
container object The instance of the particles container
particlesloaded function This function is called when particles are correctly loaded in canvas, the current container is the parameter and you can customize it here

Find your parameters configuration here.

Demos

You can see the official sample created using CodeSandbox here

The demo website is here

https://particles.js.org

There's also a CodePen collection actively maintained and updated here

https://codepen.io/collection/DPOage

About

Solid.js tsParticles official component

Topics

hacktoberfestjavascriptsolidtsparticlestypescript

Resources

Readme
MIT license
Activity
Custom properties

Stars

19 stars

Watchers

2 watching

Forks

3 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.