3.3.8 • Published 2 years ago

react-hook-notification v3.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

3.3.8

2 years ago

3.3.7

2 years ago

3.3.6

2 years ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

3.0.9

2 years ago

3.3.1

2 years ago

3.1.3

2 years ago

3.0.12

2 years ago

3.3.0

2 years ago

3.1.2

2 years ago

3.2.0

2 years ago

3.1.1

2 years ago

3.0.10

2 years ago

3.1.0

2 years ago

3.0.11

2 years ago

3.0.8

2 years ago

3.1.6

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.0.7

2 years ago

3.0.5

2 years ago

3.0.4

2 years ago

3.0.3

2 years ago

3.0.0

2 years ago

2.1.0

2 years ago

2.0.9

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago