{"id":46109577,"url":"https://github.com/klausbrandner/ngx-notifications","last_synced_at":"2026-03-13T17:00:46.936Z","repository":{"id":57682232,"uuid":"476241850","full_name":"klausbrandner/ngx-notifications","owner":"klausbrandner","description":"Simple notification library for Angular","archived":false,"fork":false,"pushed_at":"2026-02-21T11:30:18.000Z","size":547,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-21T17:48:04.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klausbrandner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-31T09:41:41.000Z","updated_at":"2026-02-21T11:30:22.000Z","dependencies_parsed_at":"2022-09-10T16:32:30.186Z","dependency_job_id":null,"html_url":"https://github.com/klausbrandner/ngx-notifications","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/klausbrandner/ngx-notifications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klausbrandner%2Fngx-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klausbrandner%2Fngx-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klausbrandner%2Fngx-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klausbrandner%2Fngx-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klausbrandner","download_url":"https://codeload.github.com/klausbrandner/ngx-notifications/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klausbrandner%2Fngx-notifications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30471114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-03-01T22:00:55.625Z","updated_at":"2026-03-13T17:00:46.930Z","avatar_url":"https://github.com/klausbrandner.png","language":"TypeScript","funding_links":["https://buymeacoffee.com/s9QBui6alO"],"categories":["Third Party Components"],"sub_categories":["Notifications"],"readme":"# Ngx Notifications\n\nSimple, lightweight toast notifications for Angular.\n\n## Features\n\n- `info`, `success`, `warning`, and `error` notification methods\n- Per-notification overrides (`color`, `animation`, `timeDisplayed`)\n- Global defaults via `setOptions(...)`\n- Queue limit with `maxNotificationsCount`\n- Flexible positions (`top-*` and `bottom-*`)\n\n## Installation\n\n```bash\nnpm install @fivedesigns/ngx-notifications\n```\n\n## Quick Start\n\nInject `NgxNotificationService` anywhere (component, service) and call a method.\n\n```ts\nimport { Component, inject } from '@angular/core';\nimport { NgxNotificationService } from '@fivedesigns/ngx-notifications';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss']\n})\nexport class AppComponent {\n  private readonly notificationService = inject(NgxNotificationService);\n\n  save(): void {\n    this.notificationService.success('Saved', 'Your changes were saved successfully.');\n  }\n}\n```\n\nThe notification container is mounted automatically when the first notification is shown.\n\n## Service API\n\nEach method accepts:\n\n- `title: string`\n- `message: string`\n- `options?: NgxNotificationOptions`\n\n```ts\nthis.notificationService.info(title, message, options);\nthis.notificationService.success(title, message, options);\nthis.notificationService.warning(title, message, options);\nthis.notificationService.error(title, message, options);\n```\n\n## Per-Notification Options\n\n```ts\nimport { NgxNotificationOptions } from '@fivedesigns/ngx-notifications';\n\nconst options: NgxNotificationOptions = {\n  color: '#4f46e5',\n  animation: 'fade', // 'bounce' | 'slide' | 'fade'\n  timeDisplayed: 3000\n};\n\nthis.notificationService.info('Heads up', 'Custom-styled notification', options);\n```\n\n## Global Configuration\n\nSet defaults once with `setOptions(...)`. You can provide only the fields you want to override.\n\n```ts\nimport { NgxGlobalNotificationsConfig } from '@fivedesigns/ngx-notifications';\n\nconst globalOptions: NgxGlobalNotificationsConfig = {\n  position: 'top-center',\n  maxNotificationsCount: 3,\n  timeDisplayed: 4000,\n  animation: 'slide', // 'bounce' | 'slide' | 'fade'\n  colors: {\n    info: '#6495ED',\n    success: '#22c55e',\n    warning: '#f59e0b',\n    error: '#ef4444'\n  }\n};\n\nthis.notificationService.setOptions(globalOptions);\n```\n\n**Position**\n\nUse `position` to choose where notifications appear on the screen.\n\nPossible values are:\n- `'top-left'`\n- `'top-center'`\n- `'top-right'`\n- `'bottom-left'`\n- `'bottom-center'`\n- `'bottom-right'`\n\n```typescript\nthis.notificationService.setOptions({\n  position: 'top-right'\n});\n```\n\n**Default Values**\n\n- `position`: `bottom-left`\n- `maxNotificationsCount`: `5`\n- `timeDisplayed`: `6000`\n- `animation`: `bounce`\n- `colors`:\n  - `info`: `rgb(50,173,230)`\n  - `success`: `rgb(52,199,89)`\n  - `warning`: `rgb(255,149,0)`\n  - `error`: `rgb(255,59,48)`\n\n## Donation\n\nIf you enjoy this package, you can [buy me a coffee](https://buymeacoffee.com/s9QBui6alO).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklausbrandner%2Fngx-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklausbrandner%2Fngx-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklausbrandner%2Fngx-notifications/lists"}