Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including snackbar with all npm packages installed. Try it out:

var snackbar = require("snackbar")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

snackbar v1.1.0

Lightweight feedback notifications

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

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free