1.0.17 ā€¢ Published 1 year ago

toastify-lib v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Toastify-lib

šŸŽ‰ Toastify-lib allows you to add notifications to your app with ease

Installation

$ npm install --save toastify-lib
$ yarn add toastify-lib

The gist

  import React from 'react';

  import { ToastContainer, toast, IToastConfig } from 'toastify-lib';

  
  const App = () => {
    const createToast = () => {
      toast.addToast({
        position: 'top-right',
        animationType: "fade",
        slideDirection: 'top',
        title: 'Title',
        description: 'Description',
        textColor: '#ffffff',
        toastType: 'info',
        toastDuration: 3000,
        backgroundColor: '#9A40D3',
      } as IToastConfig);
    }

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

If you use TypeScript import IToastConfig

Settings

  • title (title for your notification)
  • description (description for your notification)
  • position ('top-left' | 'top-right' | 'bottom-left' | 'bottom-right')
  • animationType ('fade' | 'slide')
  • slideDirection ('top' | 'left' | 'right' | 'bottom')
  • textColor (color for your notification text)
  • backgroundColor (color for your notification background)
  • toastType ('info' | 'success' | 'warning' | 'error')
  • toastDuration (display duration in ms)
1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago