react-stacked-toast

Getting Started

Install with Yarn

yarn add react-stacked-toast

Install with NPM

npm install react-stacked-toast

Quick usage

1. Add the Toaster component to your application

import { Toaster } from 'react-stacked-toast';
const App = () => {
return (
<Toaster />
// Other components
);
};

2. Use the toast api to create a toast anywhere in your application

import { toast } from 'react-stacked-toast';
const Component = () => {
const handleClick = () => {
// Quickly make a toast
toast("Here is your toast");
// Or need more customization
toast({
title: 'React Stacked Toast',
description: 'Here is your toast!',
icon: '🍞'
...
});
}
return (
<button
onClick={handleClick}
>
Show toast
</button>
);
};