Skip to content

PLDaily/show-toast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

show-toast

Build Status npm npm npm Coverage Status npm

Overview

A Toast Box

demo

Install

Install show-toast

npm install show-toast

Import show-toast

ES6/commonjs import style is supported.

// ES6
import showToast from 'show-toast';

// commonjs
var showToast = require("show-toast");

or link as a script in an html file and access global variable showToast.

<script src="dist/show-toast.js"></script>

Usage

showToast('this is a success toast box')

showToast({
  str: "this is a success toast box",
  time: 2000,
  position: 'top'
})

showToast({
  str: 'this is an error toast box',
  time: 2000
})

options

Option Description default type acceptable values
str toast text content null String -
time time duration 2000 Number -
postion toast postion 'middle' String 'top' 'middle' 'bottom'

LICENSE

MIT@PLDaily

About

🚀A Toast Box

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published