npm install somoto
Render <Toaster/> in the root of your app.
import { Toaster, toast } from 'somoto' function App() { return ( <div> <Toaster /> <button onClick={() => toast('Toast for you!')}> Give me a toast </button> </div> ) }
Swipe direction changes depending on the position.
toast('Event has been created')
Swipe direction changes depending on the position.
<Toaster position="bottom-right" />
You can change the amount of toasts visible through the visibleToasts
prop.
<Toaster expand={false} />
toast.success('Event has been created') // ... <Toaster richColors />