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.3.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
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
showProgressBarbooleannotrueShow or hide progress bar
showButtonClosebooleannotrueShow or hide close button
closeOnClickbooleannotrueClose on click
showIconbooleannotrueShow or hide icon
autoClosebooleannotrueClose notification after delay ends
pauseOnHoverbooleannotrueAuto close pause on hover
draggablebooleannotrueEnable or disable drag
titleMaxLinesnumberno1Maximum number of lines for title
textMaxLinesnumberno2Maximum number of lines for text

LICENSE

License

Developed by: André Coelho

Keywords

FAQs

Package last updated on 16 Jun 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