Build Requirements
- node.js
- browserify
Dependencies
- jQuery 1.7
- transit
- underscore
Notes
- For any animation documentation, see transit
Use Case
- Alerts
- Confirmations - customized anyway you want
- Growl-like notifications
- View states
API
NotificationBuilder bark.register(name)
Registers a new notification
//this will add a sort of "puff" alertBark //set the default OK message //the background color for the alerts. Makes content unclickable. //scale from -> to on transition in //puff out;
Somewhere in your html <head />
:
Now run your new alert:
Bark;
NotificationBuilder API
transitionIn(from, to, easing)
Sets the transition-in animation properties
from
- css propertiesto
- css propertieseasing
- css transit docs
transitionOut(from, to, easing)
Sets the transition-out animation properties.
layout(options)
Page layout options
options
center
- if set to true, the all notifications will be placed in the center of the screenright
- make the notifications right-boundtop
- top bound in pixelsbottom
- --left
- --width
- width of the notifications container
modalClass(className)
Sets the class name of the background for the notifications. Set this property if you want to disable everything except notifications.
max(n)
Sets the maximum number of notifications that are allowed to be displayed simultaneously.
For growl-like notifications, this number should be set the greater than 1. For alert-like notifications, this number should be set to 1.
closeAfterTime(ms)
Closes the notifications after the given duration (in milliseconds). Use this for growl-like notifications.