Skip to content

YvanY/vtoast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vtoast

A simple toast based on Vue.js

Demo

Install

npm install @yvany/vtoast

Example

import toast from '@yvany/vtoast'

// default options
toast('Error !')

// custom options
toast({
  message: 'Error !',

  // auto close after 3000ms
  duration: 3000,

  // vue style binding
  style: {
    color: '#F56C6C',
    background: '#FEF0F0',
    border: '1px solid #FDE2E2'
  }

  // ...other html attributes
})