Socket
Book a DemoInstallSign in
Socket

cheers-alert

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

cheers-alert

simple website notification

1.4.1
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

cheers-alert

simple website notification

Build Status Coverage Status Code Climate

Demo Animation

Demo Page

Install

NPM

$ npm install cheers-alert --save

Bower

$ bower install cheers-alert --save

Usage

import cheers from 'cheers-alert';
import 'cheers-alert/src/cheers-alert.css'; //load style
import 'font-awesome/css/font-awesome.min.css'; //load font-awesome

cheers.success({
    title: 'Warning',
    message: 'Validation error',
    alert: 'slideleft',
    icon: 'fa-user',
    duration: 3,
    callback: () => {}
});

Properties

  • title - [String] header(optional).
  • message - [String] message or content(required).
  • alert - [String] transition of notification(defaults to fadein).
  • icon - [String] uses font awesome(optional).
  • duration - [Number] transition duration(defaults to 4) in seconds.
  • callback - [Function] callback function triggered onClick.

Notification Types

  • success
  • warning
  • error
  • info

Alert Types

  • slideleft
  • fadein

Configuring .duration

set the .duration one-time to avoid redundancy. minimum of 2(seconds).

cheers.setDuration(10); //sets all notification's transition.

Disable close onClick

set to false to prevent closing onClick.

cheers.setToggle(false); //defaults to true when not set.

Disable stacking

set false to disable stacking of notifications.

cheers.setStacking(false); //defaults to true when not set.

Customize CSS

overide this class to modify styles.

<div class="cheer-holder success">  <!-- success, error, warning or info  -->
    <div class="cheers-icon"></div>
    <div class="cheers-body">
        <div class="cheers-title"></div>
    </div>
</div>

Keywords

cheers-alert

FAQs

Package last updated on 11 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.