React-notification-badge

Simple notification badge react component

View the Project on GitHub georgeOsdDev/react-notification-badge

react-notification-badge Build Status npm version

Simple notification badge react component

Gyazo

Demo

View Demo

Installation

npm install --save react-notification-badge

API

NotificationBadge

Props

NotificationBadge.propTypes = {
  count: React.PropTypes.number,
  label: React.PropTypes.string,
  containerStyle: React.PropTypes.object,
  style: React.PropTypes.object,
  className: React.PropTypes.string,
  effect: React.PropTypes.array,
  duration: React.PropTypes.number
};

Usage example

import NotificationBadge from 'react-notification-badge';
import {Effect} from 'react-notification-badge';

<div style={container}>
  <NotificationBadge count={this.state.count} effect={Effect.SCALE}/>
</div>

See example

npm install
npm run start:example

Tests

npm test