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.
- Host: GitHub
- URL: https://github.com/mosespace/mtoast
- Owner: mosespace
- Created: 2025-01-27T13:10:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-28T08:43:09.000Z (about 1 year ago)
- Last Synced: 2025-05-29T15:16:30.181Z (about 1 year ago)
- Topics: toast, toaster, toaster-message, toasters
- Language: TypeScript
- Homepage: https://mtoast.mosespace.com
- Size: 618 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).