Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hunghg255/toast
https://github.com/hunghg255/toast
notifications npm toastify
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hunghg255/toast
- Owner: hunghg255
- Created: 2022-03-15T16:44:11.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T08:54:49.000Z (8 months ago)
- Last Synced: 2024-10-31T18:14:49.265Z (2 months ago)
- Topics: notifications, npm, toastify
- Language: JavaScript
- Homepage: https://hunghg255.github.io/toast/demo/index.html
- Size: 244 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
A library to show toast notification on web## 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-tinyor
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',
});
```