1.0.2 • Published 5 years ago

toastit.js v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

toastit.js

An ultra-light, configurable HTML toast messages suitable for your webapp.

npm install toastit.js bower install toastit.js

Demo

Compatibility

toastit.js is compatible with AMD (require.js), CommonJS (like browserify) and as a global script in html.

Usage

To use toastit.js, wire in two files:

  • dist/toastit.min.js
  • dist/toastit.css

toastit(text, timeout, options) is then available as a function.

API

toastit(text, timeout, options)

  • timeout - duration ms of the animated toast messages (this parameter is optional - it defaults to 3000ms).
  • options - a hash (javascript object) with keys being css property names. Example: {fontSize: '18px'}

Building

The styles were written in LESS (src/toastit.less). There's a gulpfile in the project root which handles two tasks:

  • LESS compilation to CSS followed by autoprefixer last 2 versions
  • Minification of JS code

Built files are then put in dist directory.

License

MIT

1.0.2

5 years ago

1.0.1

10 years ago

1.0.0

10 years ago