vuetify2-toast

import Vue from "vue" import Toast2 from "vuetify2-toast"

Usage no npm install needed!

<script type="module">
  import vuetify2Toast from 'https://cdn.skypack.dev/vuetify2-toast';
</script>

README

Vuetify2-toast

Installation

NPM:

npm i vuetify2-toast --save

YARN:

yarn add vuetify2-toast

Usage

import Vue from "vue"
import Toast2 from "vuetify2-toast"

Vue.use(Toast2)

App.vue

<template>
   <v-app>
      <vue-toast-group name="default">
   </v-app>
</template>

** name: this is your optional name to install an element that allows you to use $toast. Yes you can get more by specifying different names ** ** View more prop in https://vuetifyjs.com/en/api/v-snackbar **

export default {
   methods: {
      showToast() {
         this.$toast.success("default", "Hello success toast")
         /// or
         this.$toast.success("default", {
            $text: "Hello success toast",
            /// option for component view in: https://vuetifyjs.com/en/api/v-snackbar
            /// the option here overrides the options at <vue-toast-group />
         })
      }
   }
}