An open API service indexing awesome lists of open source software.

https://github.com/mosespace/mtoast

A lightweight, customizable, and accessible toast component that makes notifications in your React app delightful.
https://github.com/mosespace/mtoast

toast toaster toaster-message toasters

Last synced: 12 months ago
JSON representation

A lightweight, customizable, and accessible toast component that makes notifications in your React app delightful.

Awesome Lists containing this project

README

          

## Usage

To start using the library, install it in your project:

```bash
npm install @mosespace/toast@latest
```

add the following to your tailwind.config.ts

```
content: [
...
'./node_modules/@mosespace/toast/**/*.{js,ts,jsx,tsx}', // Include this line
],
```

Add `` to your app, it will be the place where all your toasts will be rendered.
After that you can use `toast()` from anywhere in your app.

```jsx
import { Toaster, toast } from '@mosespace/toast';

// ...

function App() {
return (



toast.success('My first toast')}>
Give me a toast


);
}
```

## Documentation

Find the full API reference in the [documentation](https://mtoats.mosespace.com#getting-started).