# vuetify-toast-snackbar-ng

> Basic Vue toast service that uses Vuetify Snackbar component for Vuetify 2.3+

Latest version **0.7.5** (published 2022-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuetify-toast-snackbar-ng
pnpm add vuetify-toast-snackbar-ng
yarn add vuetify-toast-snackbar-ng
bun add vuetify-toast-snackbar-ng
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.5 |
| Published | 2022-06-06 |
| First published | 2020-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 60.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | hanjiawei |
| Maintainers | hanjiawei |
| Keywords | vuetify, toast, snackbar |

## Links

- npm: https://www.npmjs.com/package/vuetify-toast-snackbar-ng
- Repository: https://github.com/jaredhan418/vuetify-toast-snackbar
- Issues: https://github.com/jaredhan418/vuetify-toast-snackbar/issues
- npm.io page: https://npm.io/package/vuetify-toast-snackbar-ng

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.7.5 (latest) — 2022-06-06
- 0.7.4 — 2022-01-20
- 0.7.3 — 2020-08-24
- 0.7.2 — 2020-08-18
- 0.7.1 — 2020-08-18
- 0.7.0 — 2020-07-04

## README

# Vuetify Toast Snackbar for Vuetify 2.3+

> Basic Vue toast service with queue support that uses [Vuetify](https://github.com/vuetifyjs/vuetify) Snackbar component.
> Update from https://github.com/eolant/vuetify-toast-snackbar

## Installation

```bash
npm install vuetify-toast-snackbar-ng
```

## Usage

### Bundler (Webpack, Rollup)

```js
import VuetifyToast from 'vuetify-toast-snackbar-ng'

Vue.use(VuetifyToast, {
	x: 'right', // default
	y: 'bottom', // default
	color: 'info', // default
	icon: 'info',
	iconColor: '', // default
	classes: [
		'body-2'
	],
	timeout: 3000, // default
	dismissable: true, // default
	multiLine: false, // default
	vertical: false, // default
	queueable: false, // default
	showClose: false, // default
	closeText: '', // default
	closeIcon: 'close', // default
	closeColor: '', // default
	slot: [], //default
	shorts: {
		custom: {
			color: 'purple'
		}
	},
	property: '$toast' // default
})
```

### Vue loader (e.g. Nuxt.js)

Update `plugins/vuetify.js`

```js
import Vue from 'vue'
import Vuetify, { VSnackbar, VBtn, VIcon } from 'vuetify/lib'
import VuetifyToast from 'vuetify-toast-snackbar-ng'

Vue.use(Vuetify, {
  components: {
    VSnackbar,
    VBtn,
    VIcon
  }
})

Vue.use(VuetifyToast)
```

### Call

```js
this.$toast('Default toast')

this.$toast.info('Info toast')

this.$toast('Custom options', {
	color: 'green',
	dismissable: true,
	queueable: true
})

this.$toast.custom('Custom short')

this.$toast(null, {
	slot: [this.$createElement('button', ['Click here'])]
})
```

### Get currently displayed Toast component

```js
let cmp = this.$toast.getCmp()
cmp.message = 'Dynamic properties'
cmp.close()
```

### Clear Toasts queue

```js
let queue = this.$toast.clearQueue()
```

---
_Source: https://npm.io/package/vuetify-toast-snackbar-ng · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
