{"id":19121562,"url":"https://github.com/tsparticles/inferno","last_synced_at":"2025-05-05T16:27:12.027Z","repository":{"id":103337406,"uuid":"564553694","full_name":"tsparticles/inferno","owner":"tsparticles","description":"Inferno.js tsParticles official component","archived":false,"fork":false,"pushed_at":"2024-11-26T23:28:32.000Z","size":836,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T10:28:22.683Z","etag":null,"topics":["hacktoberfest","inferno","javascript","tsparticles","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsparticles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"matteobruni,tsparticles"}},"created_at":"2022-11-11T00:46:41.000Z","updated_at":"2024-11-26T23:28:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b74f0218-3c8c-4336-9944-f0aaad7eb789","html_url":"https://github.com/tsparticles/inferno","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Finferno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Finferno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Finferno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Finferno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsparticles","download_url":"https://codeload.github.com/tsparticles/inferno/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252533079,"owners_count":21763522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","inferno","javascript","tsparticles","typescript"],"created_at":"2024-11-09T05:17:47.846Z","updated_at":"2025-05-05T16:27:12.005Z","avatar_url":"https://github.com/tsparticles.png","language":"TypeScript","funding_links":["https://github.com/sponsors/matteobruni,tsparticles","https://github.com/sponsors/matteobruni","https://www.buymeacoffee.com/matteobruni","https://img.buymeacoffee.com/button-api/?text=Buy"],"categories":[],"sub_categories":[],"readme":"[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)\n\n# inferno-particles\n\n[![npm](https://img.shields.io/npm/v/inferno-particles)](https://www.npmjs.com/package/inferno-particles) [![npm](https://img.shields.io/npm/dm/inferno-particles)](https://www.npmjs.com/package/inferno-particles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)\n\nOfficial [tsParticles](https://github.com/matteobruni/tsparticles) Inferno component\n\n[![Discord](https://particles.js.org/images/discord.png)](https://discord.gg/hACwv45Hme) [![Telegram](https://particles.js.org/images/telegram.png)](https://t.me/tsparticles)\n\n[![tsParticles Product Hunt](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=186113\u0026theme=light)](https://www.producthunt.com/posts/tsparticles?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-tsparticles\") \u003ca href=\"https://www.buymeacoffee.com/matteobruni\"\u003e\u003cimg src=\"https://img.buymeacoffee.com/button-api/?text=Buy me a beer\u0026emoji=🍺\u0026slug=matteobruni\u0026button_colour=5F7FFF\u0026font_colour=ffffff\u0026font_family=Arial\u0026outline_colour=000000\u0026coffee_colour=FFDD00\"\u003e\u003c/a\u003e\n\n## Installation\n\n```shell\nnpm install inferno-particles\n```\n\nor\n\n```shell\nyarn add inferno-particles\n```\n\n## How to use\n\n### Code\n\nExamples:\n\n_Remote url_\n\n```javascript\nimport Particles from \"inferno-particles\";\nimport { loadFull } from \"tsparticles\";\n\nclass App extends Component {\n    constructor(props) {\n        super(props);\n\n        this.particlesInit = this.particlesInit.bind(this);\n        this.particlesLoaded = this.particlesLoaded.bind(this);\n    }\n\n    particlesInit(main) {\n        console.log(main);\n\n        // you can initialize the tsParticles instance (main) here, adding custom shapes or presets\n        // this loads the tsparticles package bundle, it's the easiest method for getting everything ready\n        // starting from v2 you can add only the features you need reducing the bundle size\n        loadFull(main);\n    }\n\n    particlesLoaded(container) {\n        console.log(container);\n    }\n\n    render() {\n        return (\n            \u003cParticles\n                id=\"tsparticles\"\n                url=\"http://foo.bar/particles.json\"\n                init={this.particlesInit}\n                loaded={this.particlesLoaded}\n            /\u003e\n        );\n    }\n}\n```\n\n_Options object_\n\n```javascript\nimport Particles from \"inferno-particles\";\nimport { loadFull } from \"tsparticles\";\n\nclass App extends Component {\n    constructor(props) {\n        super(props);\n\n        this.particlesInit = this.particlesInit.bind(this);\n        this.particlesLoaded = this.particlesLoaded.bind(this);\n    }\n\n    particlesInit(main) {\n        console.log(main);\n\n        // you can initialize the tsParticles instance (main) here, adding custom shapes or presets\n        // this loads the tsparticles package bundle, it's the easiest method for getting everything ready\n        // starting from v2 you can add only the features you need reducing the bundle size\n        loadFull(main);\n    }\n\n    particlesLoaded(container) {\n        console.log(container);\n    }\n\n    render() {\n        return (\n            \u003cParticles\n                id=\"tsparticles\"\n                init={this.particlesInit}\n                loaded={this.particlesLoaded}\n                options={{\n                    background: {\n                        color: {\n                            value: \"#0d47a1\",\n                        },\n                    },\n                    fpsLimit: 120,\n                    interactivity: {\n                        events: {\n                            onClick: {\n                                enable: true,\n                                mode: \"push\",\n                            },\n                            onHover: {\n                                enable: true,\n                                mode: \"repulse\",\n                            },\n                            resize: true,\n                        },\n                        modes: {\n                            push: {\n                                quantity: 4,\n                            },\n                            repulse: {\n                                distance: 200,\n                                duration: 0.4,\n                            },\n                        },\n                    },\n                    particles: {\n                        color: {\n                            value: \"#ffffff\",\n                        },\n                        links: {\n                            color: \"#ffffff\",\n                            distance: 150,\n                            enable: true,\n                            opacity: 0.5,\n                            width: 1,\n                        },\n                        move: {\n                            direction: \"none\",\n                            enable: true,\n                            outMode: \"bounce\",\n                            random: false,\n                            speed: 6,\n                            straight: false,\n                        },\n                        number: {\n                            density: {\n                                enable: true,\n                                area: 800,\n                            },\n                            value: 80,\n                        },\n                        opacity: {\n                            value: 0.5,\n                        },\n                        shape: {\n                            type: \"circle\",\n                        },\n                        size: {\n                            value: { min: 1, max: 5 },\n                        },\n                    },\n                    detectRetina: true,\n                }}\n            /\u003e\n        );\n    }\n}\n```\n\n### Props\n\n| Prop            | Type     | Definition                                                                                                                                          |\n| --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| id              | string   | The id of the element.                                                                                                                              |\n| width           | string   | The width of the canvas.                                                                                                                            |\n| height          | string   | The height of the canvas.                                                                                                                           |\n| options         | object   | The options of the particles instance.                                                                                                              |\n| url             | string   | The remote options url, called using an AJAX request                                                                                                |\n| style           | object   | The style of the canvas element.                                                                                                                    |\n| className       | string   | The class name of the canvas wrapper.                                                                                                               |\n| canvasClassName | string   | the class name of the canvas.                                                                                                                       |\n| container       | object   | The instance of the [particles container](https://particles.js.org/docs/modules/Core_Container.html)                                                |\n| init            | function | This function is called after the tsParticles instance initialization, the instance is the parameter and you can load custom presets or shapes here |\n| loaded          | function | This function is called when particles are correctly loaded in canvas, the current container is the parameter and you can customize it here         |\n\nFind your parameters configuration [here](https://particles.js.org).\n\n## Demos\n\nThe demo website is [here](https://particles.js.org)\n\n\u003chttps://particles.js.org\u003e\n\nThere's also a CodePen collection actively maintained and updated [here](https://codepen.io/collection/DPOage)\n\n\u003chttps://codepen.io/collection/DPOage\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsparticles%2Finferno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsparticles%2Finferno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsparticles%2Finferno/lists"}