JSPM

react-toastify-ps

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21752F
  • License MIT

Fork of react-toastify with an optional stacking limit, stackLimit.

Package Exports

  • react-toastify-ps
  • react-toastify-ps/ReactToastify.css
  • react-toastify-ps/addons/use-notification-center
  • react-toastify-ps/dist/ReactToastify.css
  • react-toastify-ps/notification-center
  • react-toastify-ps/package.json
  • react-toastify-ps/unstyled

Readme

React-Toastify-PS

react-toastify-ps (for Pretty Stacking!) is a fork of react-toastify. There's an optional stackLimit prop to manage and improve how stacked toasts are handled, along with some smaller changes. Please check out the original package by fkhadra!

Installation

$ pnpm add react-toastify-ps
$ npm install --save react-toastify-ps
$ yarn add react-toastify-ps

Usage

  import React from 'react';

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

    return (
      <div>
        <button onClick={notify}>Notify!</button>
        <ToastContainer autoclose={false} stacked stackLimit={2}/>
      </div>
    );
  }

Demo

https://github.com/user-attachments/assets/6b621287-c90c-4055-b868-851efc6507e5

License

Licensed under MIT