npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-nowtify

v0.3.2

Published

Display lovely notifications

Downloads

28

Readme

Nowtify logo

React-Nowtify

Version 0.3.0

Nowtify Demo

A tiny library to display lovely notifications based on React. author: Thomas Brodusch

Tech


Nowtify uses a number of open source projects to work properly:

Usage


Nowtify requires React and Font-Awesome to run.

Script tag

Add the following code towards the head section on your page. (To get Font-Awesome Icon)

<!-- Font-Awesome Css Lib for icons. -->
<link rel="stylesheet" type="text/css" href="node_modules/font-awesome/css/font-awesome.min.css">

Add the following code towards the end of the body section on your page. Placing it at the end allows the rest of the page to load first.

<!-- React-Nowtify -->
<script src="node_modules/react-nowtify/dist/react-nowtify.js"></script>

Define the wrapper in your HTML

  <div id="nowtify-wrapper"></div>

Initialize the plugin using this code snippet

 <script>
  Nowtify.init({
    localPath       : '/node_modules/react-nowtify/' // Local path of Nowtify folder, Default: '/node_modules/react-nowtify'
    containerID     : 'ID_CONTAINER', // Default: 'nowtify-wrapper'
    displayTimeout  : 6000,         // Default 5000ms
    dismissible     :  false        // Default false
    sound           : true          // Default: false
  });
 </script>

Browserify and Webpack

Install from NPM

$ npm i react-nowtify --save

Require and init

import React from 'react';
import ReacDOM from 'react-dom';

var Nowtify =  require('react-nowtify');

Init Nowtify

Nowtify.init({
  containerID     : 'ID_CONTAINER',
  displayTimeout  : 6000,         // Default 5000ms
  dismissible     :  false        // Default false
  sound           : true          // Default: false
});

Format your notifications and pass it to Nowtify

var notifications = [
    {
      message     : 'The message of your first notification',
      type        : 'success', // 'succes','info','warning', 'danger'
      icon        : 'rebel',  // Default: false (You can specify a specific font-awesome icon !)
      dismissible : true,     // Default: false
      hideOnClose : true,     // Default: false
      sound       : true      // Default: false
    }
];

Nowtify.show( notifications );

et voilà !

Tip: You can try React-Nowtify by open 'index.html' and see some examples in 'examples/' folder.

Development


Want to contribute? Great!

Nowtify uses Webpack for fast developing. Make a change in your file and instantanously see your updates!

Open your favorite Terminal and run these commands.

$ git clone https://github.com/tom4dev/react-nowtify nowtify
$ cd nowtify
$ npm install
$ npm start

Developpment mode watcher (Webpack):

$ npm run watch

... And you're ready to code !

Todos

  • css >>> Sass
  • Add transition/animation options
  • Add skin
  • Enable skin customisation

License

MIT

Free Software, Hell Yeah!