@hoppscotch/vue-toasted

Port of vue-toasted to Vue 3
169,643 10
Install
npm install @hoppscotch/vue-toasted
Latest Version:0.1.0
Vue:3
License:MIT
Last Updated:Jun 6, 2023
Links: GitHub  ·  npm
Maintainer: liyasthomas

@hoppscotch/vue-toasted

A Vue 3 port of the vue-toasted library.



Install

  • Install the package from npm
    npm install @hoppscotch/vue-toasted
    

Usage

  • Initialize the Vue plugin. For example, for a Vite Vue application
    // main.js
    import Toasted from "@hoppscotch/vue-toasted"
    import { createApp } from "vue"
    import App from "./App.vue"
    
    // Make sure to include the default stylings
    import "@hoppscotch/vue-toasted/style.css"
    
    const app = 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"
    
    export default defineComponent({
      mounted() {
          // Should give you access to the toasted show function
          this.$toasted.show("Hola! From Options API!")
      }
    })
    
    For Composition API:
    const toast = useToasted()
    toast.show("Hola! From Composition API!")
    

Related Packages

vue-toasted

Responsive Touch Compatible Toast plugin for VueJS 2+

2,122,315 2,194
@gitlab/vue-toasted

Responsive Touch Compatible Toast plugin for VueJS 2+

12,510
vue-toaster-snackbar

Responsive Toaster and snackbar plugin with advanced features for Vue applicatio...

1,338 2
vue-toast-component

移动端toast弹框,样式美观、轻量,支持vue2.0

921
vue-toast-custom

一个vue toast插件 主要应用在移动端

503

Version History

Version Released License
0.1.0 MIT
0.0.8 MIT
0.0.7 MIT
0.0.6 MIT
0.0.5 MIT