Giter Site home page Giter Site logo

ajprala / js-snackbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mickelsonmichael/js-snackbar

0.0 0.0 0.0 45 KB

A simple, jQuery free Snackbar (Toast) alert

Home Page: http://michaelmickelson.com/js-snackbar

License: MIT License

CSS 17.20% HTML 47.53% JavaScript 35.27%

js-snackbar's Introduction

js-snackbar

What is a Snackbar?

According to Material Design a Snackbar or Toast provides "brief messages about app processes at the bottom of the screen."

Generally, they should not have an icon associated with it and should be only one line on most devices.

While this version of a Snackbar follows the Material Design semantics closely, it strays in several major ways.

  1. You can send multiple snackbars to a user at a time, as opposed to a single Snackbar at a time.
  2. The Snackbar appears in the bottom right corner, as opposed to the bottom left or bottom center.

Basic Usage

Simply call new Snackbar(); to create the a notification message with default options.

Options

To customize a Snackbar, pass the function a JS object with any of the following properties. All properties are optional.

Property typeof Default Value Notes
message String "Operation performed successfully."
dismissible bool true
timeout number or bool 5000 Integer represents milliseconds. To specify no timeout, set the value to false
status string "" Possible statuses include "success", "green", "warning", "alert", "orange", "danger", "error", "red." All other values will default to the blue "info" status

js-snackbar's People

Contributors

mickelsonmichael avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.