Socket
Socket
Sign inDemoInstall

vue-easy-toast

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-easy-toast

A toast plugin for vue


Version published
Weekly downloads
1.6K
increased by6.06%
Maintainers
1
Weekly downloads
 
Created
Source

Vue-Easy-Toast

A toast plugin for vue.

This is a beta version! Not yet tested on Vue 2.0.

Usage

install

npm install vue-easy-toast --save

Quickstart
// before start
import Toast from 'vue-easy-toast'
Vue.use(Toast)

// in your code
Vue.toast('Can I have everybody's attention?')

// or
$vm.$toast('Let me give a toast to you all.')
More

toast or $toast takes 2 parameter: (message, [options])

Options
ParameterTypeDefaultDescription
idstringeasy-toast-defaultUnique identifier globally. Use this to create multiple toasts with different setups.
parentstringbodySelector of the container
classNamestring, arraySelf-defined class names to pass through. There are 3 pre-defined classes: et-info, et-warn,et-alert, to toast with different backgroud color
durationnumber5000The duration one toast will last, in milliseconds
modestringoverrideoverride or queue. If override, the last toast will forcibly flush previous toasts, otherwise it is queued after others
transitionstringfadeSame as vue Transitions
example
Vue.toast('Hi, there!', {
  id: 'my-toast',
  parent: '#toast-container',
  className: ['my-toast', 'toast-warning'],
  duration: 3000,
  mode: 'queue',
  transition: 'my-transition'
})

License

MIT

Keywords

FAQs

Package last updated on 23 Nov 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc