All Projects → mobilusoss → React Web Notification

mobilusoss / React Web Notification

Licence: mit
React component with HTML5 Web Notification API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Web Notification

React Native In App Notification
🔔 Customisable in-app notification component for React Native
Stars: ✭ 206 (-14.52%)
Mutual labels:  notifications
Ombi
Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
Stars: ✭ 2,711 (+1024.9%)
Mutual labels:  notifications
React Hot Toast
Smoking hot React Notifications 🔥
Stars: ✭ 4,282 (+1676.76%)
Mutual labels:  notifications
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (-12.45%)
Mutual labels:  notifications
Django Webpush
Web Push Notification Package for Django
Stars: ✭ 217 (-9.96%)
Mutual labels:  notifications
Rspec Nc
🚦 RSpec formatter for OS X's Notification Center
Stars: ✭ 223 (-7.47%)
Mutual labels:  notifications
Uptime Monitor App
A PHP application to monitor uptime and ssl certificates
Stars: ✭ 205 (-14.94%)
Mutual labels:  notifications
Herbe
Daemon-less notifications without D-Bus. Minimal and lightweight.
Stars: ✭ 235 (-2.49%)
Mutual labels:  notifications
React Notification System
A complete and totally customizable component for notifications in React
Stars: ✭ 2,439 (+912.03%)
Mutual labels:  notifications
Alert After
Get a desktop notification after a command finishes executing.
Stars: ✭ 230 (-4.56%)
Mutual labels:  notifications
Notica
Send browser notifications from your terminal. No installation. No registration.
Stars: ✭ 215 (-10.79%)
Mutual labels:  notifications
Svelte Notifications
Simple and flexible notifications system
Stars: ✭ 217 (-9.96%)
Mutual labels:  notifications
Android Notifications
Migrated:
Stars: ✭ 225 (-6.64%)
Mutual labels:  notifications
Igrowl
Growl-like notifications with an emphasis on icons
Stars: ✭ 208 (-13.69%)
Mutual labels:  notifications
Psslack
PowerShell module for simple Slack integration
Stars: ✭ 231 (-4.15%)
Mutual labels:  notifications
Electron Windows Notifications
⚡️ Send native Windows WinRT notifications from Electron
Stars: ✭ 206 (-14.52%)
Mutual labels:  notifications
Apns2
⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.
Stars: ✭ 2,569 (+965.98%)
Mutual labels:  notifications
Toasted Notes
simple, flexible toast notifications for react
Stars: ✭ 241 (+0%)
Mutual labels:  notifications
Overlay support
a flutter toast and notification library
Stars: ✭ 232 (-3.73%)
Mutual labels:  notifications
Cordova Plugin Local Notifications
Cordova Local-Notification Plugin
Stars: ✭ 2,525 (+947.72%)
Mutual labels:  notifications

React-web-notification Build Status npm version codebeat badge FOSSA Status codecov

React component with HTML5 Web Notification API. This component show nothing in dom element, but trigger HTML5 Web Notification API with render method in the life cycle of React.js.

Demo

View Demo

Installation

npm install --save react-web-notification

API

Notification

React component which wrap web-notification.

Props

Notification.propTypes = {
  ignore: bool,
  disableActiveWindow: bool,
  askAgain: bool,
  notSupported: func,
  onPermissionGranted: func,
  onPermissionDenied: func,
  onShow: func,
  onClick: func,
  onClose: func,
  onError: func,
  timeout: number,
  title: string.isRequired,
  options: object,
  swRegistration: object,
};

  • ignore : if true, nothing will be happen

  • disableActiveWindow : if true, nothing will be happen when window is active

  • askAgain : if true, window.Notification.requestPermission will be called on componentDidMount, even if it was denied before,

  • notSupported() : Called when HTML5 Web Notification API is not supported.

  • onPermissionGranted() : Called when permission granted.

  • onPermissionDenied() : Called when permission denied. Notification will do nothing until permission granted again.

  • onShow(e, tag) : Called when Desktop notification is shown.

  • onClick(e, tag) : Called when Desktop notification is clicked.

  • onClose(e, tag) : Called when Desktop notification is closed.

  • onError(e, tag) : Called when Desktop notification happen error.

  • timeout : milli sec to close notification automatically. Ignored if 0 or less. (Default 5000)

  • title : Notification title.

  • options : Notification options. set body, tag, icon here. See also (https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification)

  • swRegistration : ServiceWorkerRegistration. Use this prop to delegate the notification creation to a service worker. See also (https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification) ⚠️ onShow, onClick, onClose and onError handlers won't work when notification is created by the service worker.

Usage example

See example

yarn
yarn run start:example

Tests

yarn test

Update dependencies

Use npm-check-updates

Known Issues

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].