You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize the Vue plugin.
For example, for a Vite Vue application
// main.jsimportToastedfrom"@hoppscotch/vue-toasted"import{createApp}from"vue"importAppfrom"./App.vue"// Make sure to include the default stylingsimport"@hoppscotch/vue-toasted/style.css"constapp=createApp(App)app.use(Toasted)// You can pass options as a second parameter
Now you will be able to access vue-toasted in your Vue components.
For Options API:
import{defineComponent}from"vue"exportdefaultdefineComponent({mounted(){// Should give you access to the toasted show functionthis.$toasted.show("Hola! From Options API!")}})
For Composition API:
consttoast=useToasted()toast.show("Hola! From Composition API!")
About
🖖 Responsive Touch Compatible Toast plugin for Vue 3