https://github.com/sajan45/izi-toaster
Nuxt module to use izitoast https://izitoast.marcelodolza.com/
https://github.com/sajan45/izi-toaster
izitoast nuxt nuxt-module nuxtjs toast toast-message toast-notifications
Last synced: 1 day ago
JSON representation
Nuxt module to use izitoast https://izitoast.marcelodolza.com/
- Host: GitHub
- URL: https://github.com/sajan45/izi-toaster
- Owner: sajan45
- License: mit
- Created: 2020-06-06T21:11:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T08:08:50.000Z (over 2 years ago)
- Last Synced: 2025-09-14T09:35:07.677Z (23 days ago)
- Topics: izitoast, nuxt, nuxt-module, nuxtjs, toast, toast-message, toast-notifications
- Language: JavaScript
- Size: 5.56 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# izi-toaster
> Nuxt module for izitoast
## Setup
1. Add `izi-toaster` dependency to your project
```bash
yarn add izi-toaster # or npm install izi-toaster
```2. Add `izi-toaster` to the `modules` section of `nuxt.config.js`
```js
{
modules: [
'izi-toaster'
]
}
```## Usage
You can use $toaster in almost any context using app.$toaster or this.$toaster (Including store actions).
See [toasted official docs](https://izitoast.marcelodolza.com/) for more usage information.
```js
export default {
methods:{
async login() {
try {
this.$toaster.show('Logging in...')
await this.$axios.$post('auth/login')
this.$toaster.success('Successfully authenticated')
} catch(e){
this.$toaster.error('Error while authenticating')
}
}
}
}
```## License
[MIT License](./LICENSE)
Copyright (c) sajan
[npm-version-src]: https://img.shields.io/npm/v/izi-toaster/latest.svg
[npm-version-href]: https://npmjs.com/package/izi-toaster[npm-downloads-src]: https://img.shields.io/npm/dt/izi-toaster.svg
[npm-downloads-href]: https://npmjs.com/package/izi-toaster[github-actions-ci-src]: https://github.com/https://github.com/sajan45/izi-toaster/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/https://github.com/sajan45/izi-toaster/actions?query=workflow%3Aci[codecov-src]: https://img.shields.io/codecov/c/github/https://github.com/sajan45/izi-toaster.svg
[codecov-href]: https://codecov.io/gh/https://github.com/sajan45/izi-toaster[license-src]: https://img.shields.io/npm/l/izi-toaster.svg
[license-href]: https://npmjs.com/package/izi-toaster