node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



React & Redux based notifications center.

Thanks to Redux, the notification objects are maintained within Redux Store's State and are fired by Actions,

Features such auto dismiss and styling are supported (see below)



npm install --save re-notif

Note: for the fade animation to work properly, the css file re-notif/lib/re-notif.css must be included

Enhance reducer

Enhance Your Redux root reducer with the notification reducer:

import { reducer as notifReducer } from 're-notif';
  notifs: notifReducer,
  ...more reducers here...

Notifications Container Placement

In your application DOM tag put the Notifs component

import { Notifs } from 're-notif';
class App extends Component {
  render() {
    <div className="content">

Sending notifications

Thanks to Redux, sending notification is simply done by firing an Action:

import { reducer as notifReducer, actions as notifActions, Notifs } from 're-notif'; const { notifSend } = notifActions;

class Demo extends Component { send() { this.props.dispatch(notifSend({message: 'hello world', kind: 'info', dismissAfter: 2000})); }

render() { Send } }


Watch the demo or checkout its source code



<Notifs theme={object} CustomComponent={ReactComponent}/>

- theme.infoClasses : string [optional]

The CSS classes to attach to an info kind notification.

- theme.successClasses : string [optional]

The CSS classes to attach to an success kind notification.

- theme.warningClasses : string [optional]

The CSS classes to attach to an warning kind notification.

- theme.dangerClasses : string [optional]

The CSS classes to attach to an danger kind notification.

- CustomComponent : React Component

A custom component to render for every notification fired, component will have the following props:

- props.message

The notification's message.


The notifications reducer, should be mounted under notifs.



Send a notification

-config.message : string

The notification message

- config.kind : enum [optional]

The notification kind, can be one of: info, success, warning, danger.

- config.dismissAfter: integer [optional]

Auto dismiss the notification after the given number of MS.


Clear all current notifications.