react-toastify README

The project's README from github.com/fkhadra/react-toastify. As one markdown file: README.md.

React-Toastify

Financial Contributors on Open Collective React-toastify CI npm npm NPM Coveralls github

React toastify

stacked

custom-style

๐ŸŽ‰ React-Toastify allows you to add notifications to your app with ease.

Installation

$ npm install --save react-toastify
$ yarn add react-toastify
  import React from 'react';

  import { ToastContainer, toast } from 'react-toastify';
  
  function App(){
    const notify = () => toast("Wow so easy!");

    return (
      <div>
        <button onClick={notify}>Notify!</button>
        <ToastContainer />
      </div>
    );
  }

Documentation

Check the documentation to get you started!

Features

Demo

A demo is worth a thousand words

Contribute

Show your โค๏ธ and support by giving a โญ. Any suggestions are welcome! Take a look at the contributing guide.

You can also find me on reactiflux. My pseudo is Fadi.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

Release Notes

You can find the release note for the latest release here

You can browse them all here

License

Licensed under MIT

react-toastify (fkhadra/react-toastify)

Searching Databaseโ€ฆ

13.4K ยทGitHub
What is this?React-Toastify is a React library that lets you add notification toasts to your app with minimal setup.
Is it a UI library or a full framework?It is a lightweight React component library focused solely on toast notifications, not a full UI framework.
How do I add it to a project?Install it via npm/pnpm/yarn as a dependency, import the ToastContainer and css, then call the toast function to trigger notifications; the README says you can get it working in under 10 seconds.
Do I need any extra libraries to use it?It only needs 'clsx' as a runtime dependency; it works out of the box but can optionally pair with animation libraries like animate.css.
Is custom animation support mandatory to set up?No, custom animations are optional โ€” the library ships with its own defaults and lets you plug in any animation library if you want.
Can I render a custom React component inside a toast?Yes, the library lets you display a full React component inside the toast, with hooks that can access the props passed to it.
Does it support swipe gestures and RTL layouts?Yes, it includes swipe-to-close with a configurable direction and built-in RTL (right-to-left) support.
Can I control or update toasts after they are shown?Yes, you can update a toast programmatically, remove it, pause its timer, control its progress bar like nprogress, and limit how many toasts show at once.
Does it support dark mode and stacked notifications?Yes, it has a built-in dark mode and supports stacked notifications along with a progress bar showing remaining time.
Creator
fkhadra
Size
16.3 MB
Stars
13.4K
Age
9y
Commits ยท 90 Days