snackbar

Lightweight feedback notifications

Usage no npm install needed!

<script type="module">
  import snackbar from 'https://cdn.skypack.dev/snackbar';
</script>

README

snackbar

npm version

Lightweight feedback notifications

Install

$ npm install --save snackbar

Usage

  1. First of all make sure to import the snackbar.scss file into your project.

  2. Use the snackbar.js API

const snackbar = require('snackbar');

snackbar.show('Ohai!');

API

snackbar.show(message)

message

Type string

snackbar.duration

Time to show snackbar before hiding (default 5000)

Type number

snackbar.gap

Time between sequential snackbars (default 250)

Type number

License

MIT © André Ruffert