{"id":15284287,"url":"https://github.com/tsparticles/astro","last_synced_at":"2025-04-07T09:19:26.214Z","repository":{"id":73954869,"uuid":"593098277","full_name":"tsparticles/astro","owner":"tsparticles","description":"tsParticles Astro official component","archived":false,"fork":false,"pushed_at":"2025-03-29T22:48:15.000Z","size":211,"stargazers_count":45,"open_issues_count":14,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T06:06:30.598Z","etag":null,"topics":["astro","hacktoberfest","javascript","tsparticles","typescript"],"latest_commit_sha":null,"homepage":"","language":"Astro","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":"CHANGELOG.md","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},"funding":{"github":"matteobruni,tsparticles"}},"created_at":"2023-01-25T08:26:39.000Z","updated_at":"2025-02-20T16:48:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3fcddba-ea25-40f3-9011-59141830ae93","html_url":"https://github.com/tsparticles/astro","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.19999999999999996","last_synced_commit":"9e4752a4dfd91548c136eb305c2648d43d20899d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fastro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fastro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fastro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fastro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsparticles","download_url":"https://codeload.github.com/tsparticles/astro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"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":["astro","hacktoberfest","javascript","tsparticles","typescript"],"created_at":"2024-09-30T14:52:52.751Z","updated_at":"2025-04-07T09:19:26.180Z","avatar_url":"https://github.com/tsparticles.png","language":"Astro","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# astro-particles\n\n[![npm](https://img.shields.io/npm/v/astro-particles)](https://www.npmjs.com/package/astro-particles) [![npm](https://img.shields.io/npm/dm/astro-particles)](https://www.npmjs.com/package/astro-particles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)\n\nOfficial [tsParticles](https://github.com/matteobruni/tsparticles) Astro 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 astro-particles\n```\n\nor\n\n```shell\nyarn add astro-particles\n```\n\n## How to use\n\n```astro\n---\nimport Particles from \"astro-particles\"\nimport type { ISourceOptions } from \"tsparticles-engine\";\n\nconst options: ISourceOptions = {\n    background: {\n        color: \"#000\"\n    },\n    fullScreen: {\n        zIndex: -1\n    },\n    particles: {\n        number: {\n            value: 100\n        },\n        move: {\n            enable: true\n        }\n    }\n};\n---\n\n\u003cscript\u003e\n    import { type Container, type Engine, tsParticles } from \"tsparticles-engine\";\n    import { loadFull } from \"tsparticles\";\n\n    // the function name is the parameter passed to the init attribute\n    // required\n    // add the function to window is mandatory, it will be searched there\n    window.particlesInit = async function (engine: Engine) {\n        await loadFull(engine);\n    }\n    \n    // the function name is the parameter passed to the loaded attribute\n    // optional\n    // add the function to window is mandatory, it will be searched there\n    window.particlesLoaded = function (container: Container) {\n        console.log(\"particlesLoaded callback\");\n    }\n\u003c/script\u003e\n\n\u003cParticles id=\"tsparticles\" options={options} init=\"particlesInit\" /\u003e\n```\n\n### Props\n\n| Prop    | Type   | Definition                                                             |\n|---------|--------|------------------------------------------------------------------------|\n| id      | string | The id of the element.                                                 |\n| init    | string | The name of the function to call when the particles instance is ready. |\n| loaded  | string | The name of the function to call when the particles are loaded.        |\n| options | object | The options of the particles instance.                                 |\n| url     | string | The remote options url, called using an AJAX request                   |\n\n#### particles.json\n\nFind all configuration\noptions [here](https://particles.js.org/docs/interfaces/tsParticles_Engine.Options_Interfaces_IOptions.IOptions.html).\n\nYou can find sample json\nconfigurations [here](https://github.com/matteobruni/tsparticles/tree/main/websites/particles.js.org/presets) 📖\n\n## Demos\n\nPreset demos can be found [here](https://particles.js.org/samples/presets/index.html)\n\nThere's also a CodePen collection actively maintained and updated [here](https://codepen.io/collection/DPOage)\n\nReport bugs and issues [here](https://github.com/matteobruni/tsparticles/issues)\n\n[tsParticle Website](https://particles.js.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsparticles%2Fastro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsparticles%2Fastro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsparticles%2Fastro/lists"}