{"id":21156671,"url":"https://github.com/rxb3rth/buzz-notify","last_synced_at":"2025-07-09T12:32:37.878Z","repository":{"id":46094508,"uuid":"285289294","full_name":"roberthgnz/buzz-notify","owner":"roberthgnz","description":"✨ Small and Clean JavaScript Toast Notifications","archived":false,"fork":false,"pushed_at":"2024-03-21T20:22:31.000Z","size":696,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-10T02:43:29.116Z","etag":null,"topics":["100daysofcode","alert","hacktoberfest","project","toast"],"latest_commit_sha":null,"homepage":"https://buzz-notify-docs.vercel.app","language":"CSS","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/roberthgnz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-05T13:01:03.000Z","updated_at":"2023-10-20T20:51:24.000Z","dependencies_parsed_at":"2024-06-20T00:02:15.836Z","dependency_job_id":"b99b95ce-bfaa-4053-8f52-eeb9b033b985","html_url":"https://github.com/roberthgnz/buzz-notify","commit_stats":null,"previous_names":["groberth18/buzz-notify"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthgnz%2Fbuzz-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthgnz%2Fbuzz-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthgnz%2Fbuzz-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthgnz%2Fbuzz-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roberthgnz","download_url":"https://codeload.github.com/roberthgnz/buzz-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225543532,"owners_count":17486059,"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":["100daysofcode","alert","hacktoberfest","project","toast"],"created_at":"2024-11-20T11:47:51.028Z","updated_at":"2025-07-09T12:32:32.575Z","avatar_url":"https://github.com/roberthgnz.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/jsdelivr/npm/hm/@reliutg/buzz-notify)](https://www.jsdelivr.com/package/npm/@reliutg/buzz-notify) [![GitHub issues](https://img.shields.io/github/issues/roberthgnz/buzz-notify)](https://github.com/roberthgnz/buzz-notify/issues) [![GitHub forks](https://img.shields.io/github/forks/roberthgnz/buzz-notify)](https://github.com/roberthgnz/buzz-notify/network) [![GitHub stars](https://img.shields.io/github/stars/roberthgnz/buzz-notify)](https://github.com/roberthgnz/buzz-notify/stargazers)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n# BuzzNotify\n\nSmall and Clean JavaScript Toast Notifications\n\n## New version introduces breaking changes!\n\nNow the styles come separately and you will have to use a new import:\n\n```js\n// \u003e= 1.6.0\nimport { Notify } from '@reliutg/buzz-notify'\nimport '@reliutg/buzz-notify/dist/buzz-notify.css'\n```\n\nNow the data-attribute is used to define the notification container:\n```html\n\u003cdiv id=\"notify\"\u003e\u003c/div\u003e // \u003c-- Before 2.5.0\n\u003cdiv data-notify\u003e\u003c/div\u003e // \u003c-- After 2.5.0\n```\n\n## Features\n\n✨ Beautiful and easy to use\n😊 Lightweight\n❤️ Strongly typed\n\n## Demo\n\nhttps://buzz-notify-docs.vercel.app\n\n## Install\n\n```bash\nnpm install @reliutg/buzz-notify\n```\n\n### CDN\n\n```html\n\u003clink rel=\"stylesheet\" href=\"https://unpkg.com/@reliutg/buzz-notify/dist/buzz-notify.css\" /\u003e\n\u003cscript src=\"https://unpkg.com/@reliutg/buzz-notify\"\u003e\u003c/script\u003e\n```\n\n### ES6 Modules\n\n```js\nimport { Notify } from '@reliutg/buzz-notify'\nimport '@reliutg/buzz-notify/dist/buzz-notify.css'\n```\n\nor\n\n### Skypack no npm install needed!\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { Notify } from 'https://cdn.skypack.dev/@reliutg/buzz-notify'\n  import 'https://cdn.skypack.dev/@reliutg/buzz-notify/dist/buzz-notify.css'\n\u003c/script\u003e\n```\n\n## How to use\n\nIn `index.html`:\n\n```html\n\u003cdiv data-notify\u003e\u003c/div\u003e\n```\n\nDefine global options for all notifications.\n\n```html\n\u003cdiv \n  data-notify\n  data-notify-type=\"warning\" \n  data-notify-position=\"bottom-center\"\n  data-notify-transition=\"bounce\" \n  data-notify-duration=\"2000\"\u003e\n\u003c/div\u003e\n```\n\nIn `index.js`:\n\n```javascript\nNotify({ title: 'My notification' })\n```\n\nChange the default notification type\n\n```javascript\nNotify({ title: 'My notification', type: 'danger' })\n```\n\nDetermine the timeout in milliseconds. Default: 3000ms. If the duration is a negative number, the notification will not be removed.\n\n```javascript\nNotify({ title: 'My notification', duration: 5000 })\n```\n\nUsing asynchronously\n\n```javascript\nimport { NotifyAsync } from 'https://cdn.skypack.dev/@reliutg/buzz-notify'\nNotifyAsync({ title: 'My notification' }).then(() =\u003e {\n  console.log('Notification closed')\n})\n```\n\nListen to the close event\n\n```javascript\nconst n1 = Notify({ title: 'My notification' })\n\nn1.addEventListener('notifyclose', () =\u003e {\n  console.log('Notification closed')\n})\n```\n\nChange the position of the toast message. Can be ‘top-left’, ‘top-right’, ‘top-center’, ‘bottom-left’, ‘bottom-center’, or ‘bottom-right’. Default: ‘top-right’.\n\n```javascript\nNotify({ title: 'My notification', position: 'bottom-center' })\n```\n\nExecute a callback function when the toast message is dismissed.\n\n```javascript\nNotify({ title: 'My notification' }, () =\u003e {\n  console.log('Notification closed')\n})\n```\n\n### Usage with Vue\n\n[Try live demo](https://codi.link/PGRpdiBpZD0iYXBwIj48L2Rpdj4=%7CQGltcG9ydCAnaHR0cHM6Ly9jZG4uc2t5cGFjay5kZXYvQHJlbGl1dGcvYnV6ei1ub3RpZnkvZGlzdC9idXp6LW5vdGlmeS5jc3Mn%7CaW1wb3J0ICogYXMgVnVlIGZyb20gJ2h0dHBzOi8vY2RuLnNreXBhY2suZGV2L3Z1ZUBuZXh0L2Rpc3QvdnVlLmVzbS1icm93c2VyLnByb2QuanMnOwppbXBvcnQgQnV6ek5vdGlmeSBmcm9tICdodHRwczovL2Nkbi5za3lwYWNrLmRldi9AcmVsaXV0Zy9idXp6LW5vdGlmeSc7Cgpjb25zdCBBcHAgPSB7CiAgdGVtcGxhdGU6IGAKICAgIDxidXR0b24gQGNsaWNrPSJzaG93Tm90aWZpY2F0aW9uKCdzdWNjZXNzJywgJ3RvcCBjZW50ZXInKSI+U3VjY2VzczwvYnV0dG9uPgogICAgPGJ1dHRvbiBAY2xpY2s9InNob3dOb3RpZmljYXRpb24oJ3dhcm5pbmcnLCAnYm90dG9tIGNlbnRlcicpIj5XYXJuaW5nPC9idXR0b24+CiAgICA8YnV0dG9uIEBjbGljaz0ic2hvd05vdGlmaWNhdGlvbignZGFuZ2VyJywgJ2JvdHRvbSBsZWZ0JykiPkRhbmdlcjwvYnV0dG9uPgogICAgPGRpdiBpZD0ibm90aWZ5Ij48L2Rpdj4KICBgLAogIGRhdGEoKSB7CiAgICByZXR1cm4gewogICAgICBtZXNzYWdlOiAnT2ggaGkgZnJvbSB0aGUgY29tcG9uZW50JywKICAgIH07CiAgfSwKICBtb3VudGVkKCkgewogICAgQnV6ek5vdGlmeSh7CiAgICAgIHRpdGxlOiAnTW91bnRlZC4uLicsCiAgICAgIGR1cmF0aW9uOiAtMQogICAgfSkKICB9LAogIG1ldGhvZHM6IHsKICAgIHNob3dOb3RpZmljYXRpb24odHlwZSwgcG9zaXRpb24pIHsKICAgICAgQnV6ek5vdGlmeSh7CiAgICAgICAgdGl0bGU6IHR5cGUsCiAgICAgICAgdHlwZSwKICAgICAgICBwb3NpdGlvbgogICAgICB9KQogICAgfQogIH0KfTsKClZ1ZS5jcmVhdGVBcHAoQXBwKS5tb3VudCgnI2FwcCcpOw==)\n\n### Usage with React\n\n[Try live demo](https://codesandbox.io/s/rmg37)\n\n## Customization\n\n### Customize the styles\n\n```css\n:root {\n  --bzn-trans-cubic-bezier: cubic-bezier(0.215, 0.61, 0.455, 1);\n  --bzn-trans-duration: 0.4s;\n  --bzn-color-success: #155724;\n  --bzn-background-color-success: #d4edda;\n  --bzn-border-color-success: #c3e6cb;\n  --bzn-color-danger: #721c24;\n  --bzn-background-color-danger: #f8d7da;\n  --bzn-border-color-danger: #f5c6cb;\n  --bzn-color-warning: #856404;\n  --bzn-background-color-warning: #fff3cd;\n  --bzn-border-color-warning: #ffeeba;\n}\n```\n\n### Customize icons\n\n```js\n// You can change all or just one type of icon\n// inline svg and emojis are supported :)\nconst myIcons = {\n  success: '🎉',\n  danger: '💣',\n  warning: '⚠️',\n}\n\nNotify({ title: 'My notification', type: 'success', config: { icons: myIcons } })\n```\n\n## Options\n\n```javascript\nNotify({\n  /**\n   * Title of the notification\n   */\n  title: string;\n  /**\n   * Sets the HTML markup contained within the notification.\n   */\n  html?: string;\n  /**\n   * Sets the type of the notification.\n   * @defaultvalue \"success\"\n   */\n  type?: Type;\n  /**\n   * Sets the position of the notification.\n   * @defaultvalue \"top-right\"\n   */\n  position?: Position;\n  /**\n   * Auto close notification. Set in ms (milliseconds). If the duration is a negative number, the notification will not be removed.\n   * @defaultvalue 3000\n   */\n  duration?: number;\n  /**\n   * Sets the transition effect.\n   * @defaultvalue \"fade\"\n   */\n  transition?: Transition;\n  /**\n   * Sets the configuration of the notification.\n   */\n  config?: {\n    /**\n     * Override the default icons.\n     */\n    icons: Icons;\n  } | null;\n});\n```\n\n### Based on\n\nhttps://github.com/euvl/vue-notification\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://cutt.ly/dmxCq0G\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/52201020?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ekrau5\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/roberthgnz/buzz-notify/commits?author=Krausso\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#maintenance-Krausso\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxb3rth%2Fbuzz-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxb3rth%2Fbuzz-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxb3rth%2Fbuzz-notify/lists"}