# noori-toast

> ```markdown # Your Toast Package

Latest version **1.0.2** (published 2024-01-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install noori-toast
pnpm add noori-toast
yarn add noori-toast
bun add noori-toast
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-01-16 |
| First published | 2024-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Md Ayaz Noori |
| Maintainers | ayaznoori |
| Keywords | toast, light version toast, customise |

## Links

- npm: https://www.npmjs.com/package/noori-toast
- npm.io page: https://npm.io/package/noori-toast

## Dependencies (1)

- [rollup-plugin-ts](https://npm.io/package/rollup-plugin-ts.md) ^3.4.5

## 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.2 (latest) — 2024-01-16
- 1.0.1 — 2024-01-16
- 1.0.0 — 2024-01-16

## README

```markdown
# Your Toast Package

A simple and lightweight package for displaying toast notifications in your web applications.

## Installation

Install the package using npm:

```bash
npm install noori-toast
```

## Usage

Import the package and use the `Toast` function to display toast notifications. The function returns a disposer function that can be used to manually dismiss the toast.

```javascript
const disposeToast = require('noori-toast');

// Display a success toast at the top center position
const dispose = disposeToast('Hello, this is a success toast!', 'success', 'top-center');

// Manually dismiss the toast after a certain time (e.g., 3000 milliseconds)
setTimeout(() => {
  dispose();
}, 3000);
```

### Parameters

- `title` (string): The message to be displayed in the toast.
- `type` (string): The type of the toast, one of 'error', 'information', 'success', 'warning', or 'simple'.
- `position` (string): The position of the toast, one of 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', or 'bottom-right'.

## API

### `disposeToast(title: string, type?: string, position?: string): () => void`

Displays a toast notification with the specified title, type, and position. Returns a disposer function that can be used to manually dismiss the toast.

- `title` (string): The message to be displayed in the toast.
- `type` (string, optional): The type of the toast, one of 'error', 'information', 'success', 'warning', or 'simple' (default is 'error').
- `position` (string, optional): The position of the toast, one of 'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', or 'bottom-right' (default is 'top-center').

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
```

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