{"id":13808141,"url":"https://github.com/tsparticles/angular","last_synced_at":"2025-04-06T04:10:09.836Z","repository":{"id":65901055,"uuid":"564548952","full_name":"tsparticles/angular","owner":"tsparticles","description":"Angular tsParticles official component","archived":false,"fork":false,"pushed_at":"2025-04-01T14:06:50.000Z","size":1586,"stargazers_count":38,"open_issues_count":24,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T14:02:52.341Z","etag":null,"topics":["angular","hacktoberfest","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":"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":"2022-11-11T00:26:58.000Z","updated_at":"2025-03-26T00:03:41.000Z","dependencies_parsed_at":"2023-09-24T07:16:08.052Z","dependency_job_id":"9e477bdd-0f2b-4983-b96a-ffc841d19cb5","html_url":"https://github.com/tsparticles/angular","commit_stats":{"total_commits":108,"total_committers":3,"mean_commits":36.0,"dds":0.4629629629629629,"last_synced_commit":"a9cefd876a3c20e10c578ee30c2f83c542e96f9b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fangular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fangular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fangular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsparticles%2Fangular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsparticles","download_url":"https://codeload.github.com/tsparticles/angular/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411225,"owners_count":20934653,"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":["angular","hacktoberfest","javascript","tsparticles","typescript"],"created_at":"2024-08-04T01:01:35.869Z","updated_at":"2025-04-06T04:10:09.813Z","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":["Third Party Components"],"sub_categories":["Animations"],"readme":"[![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)\n\n# @tsparticles/angular\n\n[![npm](https://img.shields.io/npm/v/@tsparticles/angular)](https://www.npmjs.com/package/ng-particles) [![npm](https://img.shields.io/npm/dm/@tsparticles/angular)](https://www.npmjs.com/package/@tsparticles/angular) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)\n\nOfficial [tsParticles](https://github.com/matteobruni/tsparticles) Angular component\n\n[![Slack](https://particles.js.org/images/slack.png)](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI) [![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## How to use it\n\n### Install\n\n```shell\n$ npm install @tsparticles/angular @tsparticles/engine\n```\n\nor\n\n```shell\n$ yarn add @tsparticles/angular @tsparticles/engine\n```\n\n### Usage\n\n_template.html_\n\n```html\n\u003cngx-particles\n  [id]=\"id\"\n  [options]=\"particlesOptions\"\n  (particlesLoaded)=\"particlesLoaded($event)\"\n\u003e\u003c/ngx-particles\u003e\n\n\u003c!-- or --\u003e\n\n\u003cngx-particles\n  [id]=\"id\"\n  [url]=\"particlesUrl\"\n  (particlesLoaded)=\"particlesLoaded($event)\"\n\u003e\u003c/ngx-particles\u003e\n```\n\n_app.ts_\n\n```typescript\nimport {\n  MoveDirection,\n  ClickMode,\n  HoverMode,\n  OutMode,\n} from \"@tsparticles/engine\";\n//import { loadFull } from \"tsparticles\"; // if you are going to use `loadFull`, install the \"tsparticles\" package too.\nimport { loadSlim } from \"@tsparticles/slim\"; // if you are going to use `loadSlim`, install the \"@tsparticles/slim\" package too.\nimport { NgParticlesService } from \"@tsparticles/angular\";\n\nexport class AppComponent {\n  id = \"tsparticles\";\n\n  /* Starting from 1.19.0 you can use a remote url (AJAX request) to a JSON with the configuration */\n  particlesUrl = \"http://foo.bar/particles.json\";\n\n  /* or the classic JavaScript object */\n  particlesOptions = {\n    background: {\n      color: {\n        value: \"#0d47a1\",\n      },\n    },\n    fpsLimit: 120,\n    interactivity: {\n      events: {\n        onClick: {\n          enable: true,\n          mode: ClickMode.push,\n        },\n        onHover: {\n          enable: true,\n          mode: HoverMode.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: MoveDirection.none,\n        enable: true,\n        outModes: {\n          default: OutMode.bounce,\n        },\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\n  constructor(private readonly ngParticlesService: NgParticlesService) {}\n\n  ngOnInit(): void {\n    this.ngParticlesService.init(async () =\u003e {\n      console.log(engine);\n\n      // Starting from 1.19.0 you can add custom presets or shape here, using the current tsParticles instance (main)\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      //await loadFull(engine);\n      await loadSlim(engine);\n    });\n  }\n\n  particlesLoaded(container: Container): void {\n    console.log(container);\n  }\n}\n```\n\n_app.module.ts_\n\n```typescript\nimport { NgxParticlesModule } from \"@tsparticles/angular\";\nimport { NgModule } from \"@angular/core\";\n\n@NgModule({\n  declarations: [\n    /* AppComponent */\n  ],\n  imports: [\n    /* other imports */ NgxParticlesModule /* NgxParticlesModule is required*/,\n  ],\n  providers: [],\n  bootstrap: [\n    /* AppComponent */\n  ],\n})\nexport class AppModule {}\n```\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%2Fangular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsparticles%2Fangular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsparticles%2Fangular/lists"}