Skip to content

abaicus/vue-simple-toast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue.js simple toast.

Install

npm install vue-simple-toast --save

Import

Import plugin:

import simpleToast from 'vue-js-simple-toast'

Vue.use(simpleToast)

OR

Import component:

import { simpleToast } from 'vue-js-simple-toast'

Vue.component('simpleToast', simpleToast)

Use

<simple-toast  
    :class="type"
    :type="type"
    :dismissible="true"
    :auto-dismiss="false"
    iconClass="dashicons dashicons-yes"
    message="Options saved."
    >
</simple-toast>

Properties

Name Type Default Description
autoDismiss Boolean false Should the toast auto-dismiss after 1.7s
color [String, Object] undefined If String - background color of the toast.
If Object - background color for the toast in multiple types
Example: {error: 'red', warning: 'yellow', success : 'green'}
dismissible Boolean true If the toast should be dismissible - adds a dismiss button.
iconClass String undefined Icon class that will be added on the left of the notice
message String undefined Required - the toast message
type String success Can be ['success', 'error', 'warning']