# more-toast

> More toast js

Latest version **1.0.2** (published 2022-05-08) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-05-08 |
| First published | 2022-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 60.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mohammadrezahq |
| Maintainers | mohammadrezahq |
| Keywords | toast, toast for js |

## Links

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

## 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) — 2022-05-08
- 1.0.1 — 2022-05-08
- 1.0.0 — 2022-05-05

## README

# More Toast

#### Read the documentation here: https://mohammadrezahq.github.io/more-toast/

### Setup:

Install package with npm:

```
npm i more-toast
```

### Import

```js
import Toast from 'more-toast';
```

### Initialize

```js
// Default parameters.

const config = {
	position: 'top-left',
	in: 'slide-left',
	out: 'slide-left',
	showTime: 3000,
	dir: 'ltr',
	canClose: false,
	onlyClose: false,
	overlayToast: false,
	progressBar: false,
	pauseOnHover: true,
};

const style = {
	icon: 'success',
	iconUrl: '',
	maxWidth: '450px',
	titleBgColor: 'initial',
	titleBgGradient: '',
	titleTextColor: 'black',
	bodyBgColor: 'white',
	bodyBgGradient: '',
	bodyTextColor: 'black',
	iconColor: 'black',
	border: 'none',
	borderRadius: '10px',
	titleFontSize: '16px',
	padding: '10px',
	fontFamily: 'inherit',
	closeIconColor: 'black',
	progressBarBackColor: '#eee',
	progressBarColor: '',
	progressBarGradient: 'linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12)',
	progressBarPosition: 'bottom',
	bodyPadding: '10px',
	bodyBorderTop: '4px dotted #eee',
	customClass: '',
};

const advanced = {
	enterDuration: 1000,
	exitDuration: 1000,
	vDistance: 10,
	hDistance: 10,
	onClick: () => {
		return;
	},
	buttons: null,
};

const toast = new Toast(config, style, advanced);
```

<b>Learn more in the documentation</b>

### Show the toast

```js
toast.show(String message, String body = '');
```

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