Socket
Socket
Sign inDemoInstall

@hoppscotch/vue-toasted

Package Overview
Dependencies
21
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @hoppscotch/vue-toasted

Port of vue-toasted to Vue 3


Version published
Weekly downloads
1.1K
increased by17.04%
Maintainers
2
Install size
128 kB
Created
Weekly downloads
 

Readme

Source

@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!")
    

Keywords

FAQs

Last updated on 26 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc