{"id":32956148,"url":"https://github.com/nandi95/vue-toastify","last_synced_at":"2026-01-31T11:04:08.573Z","repository":{"id":34978806,"uuid":"193223503","full_name":"nandi95/vue-toastify","owner":"nandi95","description":"🔥 Simple, extendable, dependency free notification plugin. 🔥","archived":false,"fork":false,"pushed_at":"2025-03-15T08:26:59.000Z","size":1511,"stargazers_count":232,"open_issues_count":3,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-23T20:51:36.702Z","etag":null,"topics":["alert","laravel","notification","notification-plugin","pause","pause-action","status","toast","toastify","vue"],"latest_commit_sha":null,"homepage":"https://vue-toastify.netlify.app/","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/nandi95.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,"zenodo":null},"funding":{"github":"nandi95"}},"created_at":"2019-06-22T10:54:38.000Z","updated_at":"2025-09-13T22:39:03.000Z","dependencies_parsed_at":"2023-11-29T18:31:11.378Z","dependency_job_id":"971d1c6f-3548-4f3f-882c-bdb5bbd50138","html_url":"https://github.com/nandi95/vue-toastify","commit_stats":{"total_commits":137,"total_committers":5,"mean_commits":27.4,"dds":"0.35036496350364965","last_synced_commit":"ac7481dfe5ae3f45c032a4a5f80f8d1744d1335d"},"previous_names":["nandi95/vue-notification"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/nandi95/vue-toastify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandi95%2Fvue-toastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandi95%2Fvue-toastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandi95%2Fvue-toastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandi95%2Fvue-toastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nandi95","download_url":"https://codeload.github.com/nandi95/vue-toastify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nandi95%2Fvue-toastify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"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":["alert","laravel","notification","notification-plugin","pause","pause-action","status","toast","toastify","vue"],"created_at":"2025-11-12T23:00:19.020Z","updated_at":"2026-01-31T11:04:08.567Z","avatar_url":"https://github.com/nandi95.png","language":"Vue","funding_links":["https://github.com/sponsors/nandi95"],"categories":["Components \u0026 Libraries","UI Components [🔝](#readme)"],"sub_categories":["UI Components"],"readme":"## \u003cp align=\"center\"\u003e🔥Vue Toastify🔥\u003c/p\u003e\n\u003cp align=\"center\"\u003eSimple and dependency-free notification plugin.\u003c/p\u003e\n\n## Installation\n\n```bash\nnpm i vue-toastify\n```\n\n```ts\nimport { createApp } from 'vue';\nimport plugin from 'vue-toastify';\n// base styles\nimport 'vue-toastify/index.css';\n// theme styles\nimport 'vue-toastify/themes/dark.css';\nimport type { Settings } from 'vue-toastify';\n\nconst app = createApp({  });\napp.use\u003cSettings\u003e(plugin, {  });\napp.mount('#app');\n```\n\n[Usage with Nuxt](#usage-with-nuxt)\n\n## Options:\n - [ToastOptions](src/type.ts#L195) - settings per toast\n - [Settings](src/type.ts#L113) - global settings (default settings [here](src/composables/useSettings.ts#L7))\n - [ToastPluginAPI](src/composables/useToast.ts#L13) - methods available on the `useToast()` composable\n - [Events](src/composables/useVtEvents.ts#L6) - events emitted by the plugin\n\n## Migration Information\n\nIn the future `enableHtmlInterpretation` setting will default to `false`. If you rely on that behavior, make sure to enable it in the settings. If you don't want user input treated as html, make sure to set it to `false`.\n\n## Custom styling\nStyles include a `'dark'`(default) and a `'light'` theme. If you would like to create your own styles you may use the following helpers:\n\n```ts\nimport { createVtTheme, getCssRules } from 'vue-toastify';\n\n// this will create a stylesheet if doesn't exists and insert it into the head\ncreateVtTheme('myThemeName', '#8f6b42');\n// then you can set the theme of the status or the global settings\n// alternatively, you can get an array of css rules using getCssRules\ngetCssRules('myThemeName', '#8f6b42').forEach(rule =\u003e {...});\n// this will give you a good starting point to customise the theme\n```\n\n## Custom notifications\nYou may create some methods on the `useToast()` so it will shortcut any repetition you may have in your app. To register them add a `customNotifications` key to the settings when registering the plugin.\n\n```ts\napp.use\u003cSettings\u003e(plugin, {\n    customNotifications: {\n        authenticationError: {\n            body: 'Authentication error',\n            // ... rest of the toast options here\n        }\n    }\n});\n// then later you can use it as\nuseToast().authenticationError();\n```\n\n## Ambient declaration for custom notifications\n\n```ts\nimport type { ToastPluginAPI, CustomMethods } from 'vue-toastify';\n\ndeclare module 'vue-toastify' {\n    interface MyMethods extends CustomMethods {\n        authenticationError(): string;\n    }\n\n    function useToast(): ToastPluginAPI \u0026 MyMethods;\n}\n```\n\n## Events\nThe plugin emits events that you can listen to which allows for using callbacks at different points in the toast's lifecycle.\n\n```ts\nimport { useVtEvents, useToast } from 'vue-toastify';\n\nconst toast = useToast().success({ body: 'Hello world', canTimeout: true });\n\nuseVtEvents().once('vtPaused', payload =\u003e {\n    if (payload.id === toast.id) {\n        // do something\n    }\n})\n```\n\n### Usage with Nuxt\nThe recommended way to install is by creating a plugin. As notifications are expected to be responses to user actions, we can lazy load the plugin to reduce the initial bundle size.\n\nBe sure\nto familiarise yourself with the [Nuxt plugin documentation](https://nuxt.com/docs/guide/directory-structure/plugins).\n\n```ts\n// plugins/toast.client.ts\n// .client will only run the plugin on the client side.\nimport type { Settings } from 'vue-toastify';\n\nexport default defineNuxtPlugin({\n    name: 'toast',\n    // can load the same time as the rest of the plugins\n    parallel: true,\n    setup: nuxt =\u003e {\n        // this will lazy load the plugin therefore won't be included in the entry point\n        void import('vue-toastify').then(exports =\u003e {\n            nuxt.vueApp.use\u003cSettings\u003e(exports.default, {\n                pauseOnHover: true,\n                theme: 'light',\n                position: 'top-right'\n            });\n        });\n    }\n});\n\n```\nThen specify the auto-imported preset in your configuration.\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n    css: [\n        // required base themes\n        'vue-toastify/index.css',\n        // include the theme you want to use\n        'vue-toastify/themes/light.css'\n        // or generate one of your own as described in the custom styling section\n    ],\n    imports: {\n        // this will include the composables that the plugin provides\n        // which is negligable in size compared to the plugin itself\n        presets: [\n            {\n                from: 'vue-toastify',\n                imports: [\n                    // include only the composables you need auto-imported\n                    'useToast',\n                    // 'useVtEvents',\n                    // 'useVtSettings'\n                ]\n            }\n        ]\n    },\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandi95%2Fvue-toastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnandi95%2Fvue-toastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnandi95%2Fvue-toastify/lists"}