A mobile toast plugin for vue.js
Clone or download
Leopoldthecoder 2.0.0 (#19)
* 0.1.3

* support vue 2.0

* 2.0.0
Latest commit f50215f Oct 25, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example add iconClass (#11) May 19, 2016
src 2.0.0 (#19) Oct 25, 2016
.babelrc replace webpack with cooking May 6, 2016
.eslintrc 2.0.0 (#19) Oct 25, 2016
.gitignore update .gitignore & .npmignore May 5, 2016
.npmignore replace webpack with cooking May 6, 2016
README.md add iconClass (#11) May 19, 2016
cooking.conf.js 2.0.0 (#19) Oct 25, 2016
cooking.example.conf.js add iconClass (#11) May 19, 2016
package.json 2.0.0 (#19) Oct 25, 2016

README.md

Overview

vue-toast-mobile is a mobile toast plugin for vue.js.

Installation

First, install vue-toast-mobile from npm:

$ npm install vue-toast-mobile

Then use it:

// ES6 mudule
import Toast from 'vue-toast-mobile';

// CommonJS
const Toast = require('vue-toast-mobile').default;

Usage

Basically you can pass a string to Toast:

Toast('Upload Completed');

Or invoke Toast with an object as its configuration:

Toast({
  message: 'Upload Completed',
  position: 'bottom',
  duration: 5000
});

API

Option Description Value Default
message content of the toast
position location of the toast relative to viewport 'top' 'bottom' 'middle' 'middle'
duration time before the toast vanishes, in millisecond 3000
className custom class name of the toast
iconClass class name of the optional icon font

License

MIT