Toast

Props

The table below shows the properties of second parameters of toast function

optiondescriptiontypedefault
toastIdToast's unique IdString
positionPosition per toast'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'top-center
containerIdID shown in the Toast Container Unique IDString''
pauseOnHoverThe Option that sets the timer to stop or not when a hover event occursBooleantrue
iconThe icon to be displayed in the toast.ReactNode
timeOutTime for toast to disappearNumber3000
removeTimeOutTime for toast to remove in ListNumber200
classNameClass of per toastString''
styleClass of per styleObject{}
targetTarget element where toast will be locatedObject{}
closeButtonOption to show or hide the close buttonBooleanfalse

Handler

toast.setActive : Sets the toast to an active state.
toast.isActive : Get the active state of the toast
toast.disappear : Disappear the toast after a specified time.
toast.pause : Pause the toast timer.
toast.resume : Resume the toast timer.
toast.replace : Replaces the data to be rendered for the toast.
toast.remove : Removes the toast from the list 200ms after it disappears
toast.allClear : Removes all toasts