Toast
Used to show dynamic notifications and alerts to user.
Import
js
import { MpToastManager, toast } from '@mekari/pixel3'
Playground
API
tsx
// Render MpToastManager in the root of app
<MpToastManager />
// Use toast.notify to show toast, and pass an options object
toast.notify({ title: 'Setting is imported.' })
// Use toast.clearAll to dismiss all toasts
toast.clearAll()
toast
Props
Name | Type | Default |
---|---|---|
id | string | - |
title | string | - |
variant | success | error | success |
duration | number | 3000 |
position | top-left | top-center | top-right | bottom-left | bottom-center | bottom-right | top-center |
render | any | - |