1.0.10 • Published 7 years ago

colored-snackbar v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

colored-snackbar

A super simple customizable angular snackbar module. Allows user to display custom colored snackbar in angular application.

NPM

DEMO

Installation

Installing this module is pretty easy using npm:

npm install colored-snackbar

Then just add the dependencies into HTML and inject the coloredSnackbar module into your angular application module:

In your HTML

<link rel="stylesheet" href="node_modules/colored-snackbar/css/colored-snackbar.css">
<script src="node_modules/colored-snackbar/js/colored-snackbar.js"></script>

In your module.js

angular.module('myApp', ['coloredSnackbar']);

Usage

Use the colored snackbar attribute directive in any of your clickable element in your HTML.:

<button type="button" colored-snackbar message="Colored Snack Bar"
        back-color="black" font-color="yellow" snack-time="3000" position="top" ng-click="showSnackbar()">
    Top Snackbar
</button>

Customizable options:

<button type="button" colored-snackbar message="Colored Snack Bar"
        back-color="black" font-color="yellow" snack-time="3000" position="bottom" ng-click="showSnackbar()">
    Bottom Snackbar
</button>

Options / Attributes

  • message: String Message you want to display in snackbar.
  • back-color: String Background color of snackbar, can be HEX value.
  • font-color: String Font color of text in snackbar, can be HEX value.
  • position: String Position where you want to display snackbar, two available i.e ‘top’ and ‘bottom’.
  • snack-time: Number Display duration time of your snackbar. Default is 3 seconds.
  • showSnackbar: Function To trigger colored snackbar, use it with ngClick.

License

MIT

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago