Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hunghg255/toast


https://github.com/hunghg255/toast

notifications npm toastify

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        



logo


A library to show toast notification on web


NPM Version
NPM Downloads
Minizip
Contributors
License

## Installation

[![NPM](https://nodei.co/npm/toastjs-tiny.png?compact=true)](https://nodei.co/npm/toastjs-tiny/)

#### To install the latest stable version:

```
npm install --save toastjs-tiny

or

yarn add toastjs-tiny
```

#### Basic usage:

```css
@import 'toastjs-tiny/dist/styles.css';
```

```ts
interface IToast {
text: string;
autoClose?: number;
position?: 'top-center' | 'top-right' | 'bottom-center' | 'bottom-right';
onClose?: () => {};
canClose?: boolean;
showProgress?: boolean;
pauseOnHover?: boolean;
pauseOnFocusLoss?: boolean;
type?: 'success' | 'error';
}

new ToastjsTiny(options: IToast);

new ToastjsTiny({
text: 'Update new password is successfullyUpdate new password is successfullyUpdate new password is successfullyUpdate new password is successfully',
type: 'error',
});
```