# react-bootstrap-toast

> An easy peasy to use react toast out of the box without extra rendering of component provider, it is using react-bootstrap toast component

Latest version **0.1.1** (published 2022-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-bootstrap-toast
pnpm add react-bootstrap-toast
yarn add react-bootstrap-toast
bun add react-bootstrap-toast
```

## Health

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

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2022-10-01 |
| First published | 2022-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 68 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mytabworks |
| Maintainers | mytabworks |
| Keywords | react-toaster, react-toast, react, toaster, toast, react-bootstrap, bootstrap |

## Links

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2022-10-01
- 0.1.0 — 2022-10-01

## README

# react-bootstrap-toast
An easy peasy to use react toast out of the box without extra rendering of component provider, it is using react-bootstrap toast component

# installation
```
npm i react-bootstrap-toast
```
or
```
yarn add react-bootstrap-toast
```

## import to your project
```js
import toast from 'react-bootstrap-toast'
```

### import the css
```js
import 'react-bootstrap-toast/dist/css/style.css'
```

# **_Props_**

**key** (_optional_): **_any_**
_{it makes the toaster controllable}_

**header** (_required_): **_string | reactnode | jsx_**
_{the header of the react-bootstrap toast}_

**body** (_required_): **_string | reactnode | jsx_**
_{the body of the react-bootstrap toast}_

**className** (_optional_): **_string_**
_{you can add class for to toaster}_

**classEnter** (_optional_): **_string_**
_{you can customize your own class animation enter}_

**classExit** (_optional_): **_string_**
_{you can customize your own class animation exit}_

**bg** (_optional_): **_'primary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark'_**
_{the variant of the toaster}_

**placement** (_optional_): **_'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right'_**
_{the position of the toaster}_

**duration** (_optional_): **_number_**
_{the duration that stay the toaster when put **0** the toaster will stay forever}_

**delay** (_optional_): **_number_**
_{the duration/timing of the animation}_

**dismissible** (_optional_): **_boolean_**
_{when true it will show a close button}_

**onMount** (_optional_): **_function_**
_{to determine if the toaster is mounted}_

**onUnmount** (_optional_): **_function_**
_{to determine if the toaster is unmounted}_

**onDismissed** (_optional_): **_function_**
_{to determine if the toaster is close by clicking dismissed button}_


# _**Usage**_

```js
const handleClick = () => {
  toast({
    header: 'Success',
    body: 'Show me toast'
  })
}
```

# _**TIP**_

The unmounting time is 600 milliseconds so if you are about to customize closing animation it must be within that time range to show the whole animation

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