mobin-toast
TypeScript icon, indicating that this package has built-in type declarations

3.0.12 • Public • Published

mobin-toast

✔ Mobin-Toast allows you to add notifications to your react app

Installation

$ npm install --save mobin-toast
$ yarn add mobin-toast

Features

  • Installing and using this package is very simple
  • Define behavior per toast
  • Fancy progress bar to display the remaining time
  • Possibility to update a toast
  • Dark 🌒 and light ☀ mode
  • Ability to set the duration of toast display
  • Determinig where to display the toast, you can set four positions: top-right | top-left | bottom-right | bottom-left
  • types: success | warning | error | promise
  • And much more !

Example

  import React from 'react';

  import { ToastContainer, toast } from 'mobin-toast';
  
  const App = () => {

    const handleShowToast = () => toast({title:"mobin-toast",type:"success"})

    return (
      <div>
        <button onClick={handleShowToast}>Show Toast</button>
        <ToastContainer />
      </div>
    );
  }

License

Licensed under MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mobin-toast

Weekly Downloads

6

Version

3.0.12

License

none

Unpacked Size

147 kB

Total Files

23

Last publish

Collaborators

  • mobin-libs