# @brighthr/component-toast

> To install, type the following into the command line at the root of your project:

Latest version **2.0.4** (published 2026-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @brighthr/component-toast
pnpm add @brighthr/component-toast
yarn add @brighthr/component-toast
bun add @brighthr/component-toast
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2026-01-07 |
| First published | 2022-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 22.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | bright.hr |

## Links

- npm: https://www.npmjs.com/package/@brighthr/component-toast
- npm.io page: https://npm.io/package/@brighthr/component-toast

## Dependencies (1)

- [classnames](https://npm.io/package/classnames.md) ^2.3.1

## Recent versions

- 2.0.4 (latest) — 2026-01-07
- 2.0.3 — 2025-02-03
- 2.0.2 — 2024-07-31
- 2.0.1 — 2023-08-22
- 2.0.0 — 2023-07-31
- 1.0.14 — 2023-06-08
- 1.0.13 — 2023-06-08
- 1.0.12 — 2023-06-08
- 1.0.11 — 2023-06-05
- 1.0.10 — 2023-05-17
- 1.0.9 — 2023-05-03
- 1.0.8 — 2023-03-07
- 1.0.7 — 2022-07-14
- 1.0.6 — 2022-07-12
- 1.0.5 — 2022-07-12
- … 4 more at https://npm.io/package/@brighthr/component-toast/versions

## README

# ComponentName

## Installation

To install, type the following into the command line at the root of your project:

```javascript
npm i @brighthr/component-toast
```

## placeholder for where toasts will appear

Where you add the `Toaster` component to the app will be the container that the toast messages will appear in.
Recommended that this should be at the root of your app so they appear in the bottom left corner.

```javascript
import { Toaster } from '@brighthr/component-toast';

<div>
	<Toaster />
</div>;
```

## create a new toast

Import into your file:

```javascript
import { useToast } from '@brighthr/component-toast';

const { createToast } = useToast();

<Button onClick={() => createToast({
    text: 'message for toast',
    type: 'information'
})}>
```

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