Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-hook-notification

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hook-notification

Add notifications in your React app. Types: success, error, warning, info or default

  • 3.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
103
increased by27.16%
Maintainers
1
Weekly downloads
 
Created
Source

React Hook Notification

Add notifications in your React app. Types: success, error, warning, info or default

Demo

Storybook demo

https://reverent-lalande-5e2160.netlify.app

Install

npm install react-hook-notification

or

yarn add react-hook-notification

Usage

import React from 'react';
import { useNotification } from 'react-hook-notification';

export default function Component() {
  const notification = useNotification();

  return (
    <button
      type="button"
      onClick={() =>
        notification.success({
          text: 'Notification test',
        })
      }
    >
      Dispatch
    </button>
  );
}

Props

PropertyTypeRequiredDefaultDescription
textstringyesNotification text
titlestringnoNotification title
positiontop-right | top-center | top-left | bottom-right | bottom-center | bottom-leftnotop-rightNotification position
themecolored | light | darknocoloredNotification theme
transitionbounce | flip | fade | slide | zoomnobounceNotification transition
delaynumberno5000Notification delay in milliseconds
showProgressBarbooleannotrueNotification shows or hides progress bar
showButtonClosebooleannotrueNotification show or hide close button
closeOnClickbooleannotrueNotification closes on click
showIconbooleannotrueNotification show or hide icon
autoClosebooleannotrueAutomatic closing of the notification after the delay ends
pauseOnHoverbooleannotrueAuto close pause on hover
draggablebooleannotrueEnable or disable drag

LICENSE

License

Developed by: André Coelho

Keywords

FAQs

Package last updated on 27 Apr 2022

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc