npm install buzzly
Render the toaster in the root of your app.
import { Toaster, toast } from 'buzzly'
// ...
function App() {
return (
<div>
<Toaster />
<button onClick={() => toast.success('My first toast')}>
Give me a Toast
</button>
</div>
);
}
Types are used to define the type of the data that is being passed to the component.
toast.normal('Event has been created')
Swipe direction changes depending on the position.
<Toaster position={"top-left"} />
You can use more options to customize the toast.
// ...
<Toaster richColors />