{"id":22577148,"url":"https://github.com/incuca/vue3-toaster","last_synced_at":"2025-04-15T05:17:55.053Z","repository":{"id":41068369,"uuid":"342875079","full_name":"InCuca/vue3-toaster","owner":"InCuca","description":"Lightweight toast-notification plugin for Vue 3","archived":false,"fork":false,"pushed_at":"2022-06-28T11:41:43.000Z","size":414,"stargazers_count":5,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T05:17:50.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/InCuca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-27T14:25:12.000Z","updated_at":"2022-06-28T11:41:03.000Z","dependencies_parsed_at":"2022-09-26T16:21:00.072Z","dependency_job_id":null,"html_url":"https://github.com/InCuca/vue3-toaster","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Fvue3-toaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Fvue3-toaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Fvue3-toaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InCuca%2Fvue3-toaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InCuca","download_url":"https://codeload.github.com/InCuca/vue3-toaster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010222,"owners_count":21197796,"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":[],"created_at":"2024-12-08T04:11:59.291Z","updated_at":"2025-04-15T05:17:55.024Z","avatar_url":"https://github.com/InCuca.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue3 Toaster\n\n\u003e Lightweight toast-notification plugin for Vue 3\n\n## Installation\n\n```bash\nnpm install @incuca/vue3-toaster\n```\n\n## Usage\n\nImport in your main.js\n\n```js\nimport Toaster from \"@incuca/vue3-toaster\";\n\ncreateApp(App)\n  .use(Toaster)\n  .mount(\"#app\");\n```\n\nUsage in your components with Options API\n\n```js\nthis.$toast.show(message, { ...options });\nthis.$toast.success(`Hey! I'm here`);\nthis.$toast.error(`Hey! I'm here`);\nthis.$toast.warning(`Hey! I'm here`);\nthis.$toast.info(`Hey! I'm here`);\n// Close all opened toasts after 3000ms\nsetTimeout(this.$toast.clear, 3000);\n```\n\nUsage with Composition API\n\n```js\nimport { inject } from \"vue\";\nconst toast = inject(\"toast\");\ntoast.show(message, { ...options });\n```\n\n## Available options\n\nThe API methods accepts these options:\n\n| Attribute     |      Type      |    Default     | Description                                                              |\n| :------------ | :------------: | :------------: | :----------------------------------------------------------------------- |\n| message       |     String     |       --       | Message text/html (required)                                             |\n| type          |     String     |   `default`    | `success`, `info`, `warning`, `error` or `default`                       |\n| position      |     String     | `bottom-right` | `top`, `bottom`, `top-right`, `bottom-right`,`top-left` or `bottom-left` |\n| duration      | Number/Boolean |     `4000`     | Visibility duration in milliseconds or `false` that disables duration    |\n| dismissible   |    Boolean     |     `true`     | Allow user close by clicking                                             |\n| onClick       |    Function    |       --       | Do something when user clicks                                            |\n| onClose       |    Function    |       --       | Do something after toast gets dismissed                                  |\n| queue         |    Boolean     |    `false`     | Wait for existing to close before showing new                            |\n| maxToasts     | Number/Boolean |    `false`     | Defines the max of toasts showed in simultaneous                         |\n| pauseOnHover  |    Boolean     |     `true`     | Pause the timer when mouse hover a toast                                 |\n| useDefaultCss |    Boolean     |     `true`     | Use default css styles                                                   |\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincuca%2Fvue3-toaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fincuca%2Fvue3-toaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fincuca%2Fvue3-toaster/lists"}