# uitoast-js

> A simple notification library for displaying toast style messages. Get going in as little as 2 lines of code.

Latest version **1.0.31** (published 2023-01-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install uitoast-js
pnpm add uitoast-js
yarn add uitoast-js
bun add uitoast-js
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.31 |
| Published | 2023-01-09 |
| First published | 2023-01-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Andrew Bloese |
| Maintainers | andrewblaze-00 |
| Keywords | notification, toaster, javascript, vanilla, notifications, vanilla, notifiaction, templates |

## Links

- npm: https://www.npmjs.com/package/uitoast-js
- Repository: https://github.com/andrewbloese-00/toastscript
- Homepage: https://github.com/andrewbloese-00/toastscript#readme
- Issues: https://github.com/andrewbloese-00/toastscript/issues
- npm.io page: https://npm.io/package/uitoast-js

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.0.31 (latest) — 2023-01-09
- 1.0.3 — 2023-01-09
- 1.0.2 — 2023-01-01
- 1.0.1 — 2023-01-01
- 1.0.0 — 2023-01-01

## README

#  UI Toast

A simple javascript library for creating popup notifications in vanilla javascript. 

## Usage 
1. Installation
> With npm
```npm install  uitoast-js```



2. Setup 

In a js file...
```
import {Toaster} from " uitoast-js"
//*initialize 
const toaster = new Toaster()


//* send a success message
toaster.success("enter a success message here")

//* send an error message
toaster.error("enter an error message here")

// * using the loading notification

//1 create some asynchronous function
async function fetchStuff(){
    ...
}

//2 call the toaster loading function
toaster.loading(
    fetchStuff,
    "message to display while loading",
    "message to display when loading success" , "message to display when loading error"
)


//* custom notification
toaster.custom(
    "🙂",
    "message to display",
    { 
        fontFamily: "sans-serif",
        color: "red,
    }
    )
```

---
_Source: https://npm.io/package/uitoast-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
