Hey you like my work? Consider sponsoring me
Menu
Material-React-Toastify
GitHub
Material-React-Toastify
  • GitHub
  • Getting Started
    • Introduction
    • Installation
    • The gist of material-react-toastify
    • Release notes
  • Usage
    • Positioning toast
    • Handling autoClose
    • Render more than string
    • Remove toast programmatically
    • Pause toast timer when the window loses focus
    • Use a custom id
    • Prevent duplicate
    • Delay notification appearance
    • Limit the number of toast displayed
    • Use a controlled progress bar
    • Update a toast
    • Define callback
    • Listen for changes
    • Use a custom close button or remove it
    • Add an undo action to a toast (like Google Drive)
    • Usage with redux
    • Replace the default transition
    • Define a custom enter and exit transition
    • Drag to remove
    • Enable right to left support
    • Accessibility
    • Lazy container and multi-container
    • How to style
    • Dispatch toast outside of react component
  • API Reference
    • ToastContainer
    • toast
    • cssTransition
    • collapseToast
    • useToastContainer
    • useToast

Replace the default transition

There are 4 built-in transitions provided.

  • Bounce

  • Slide

  • Zoom

  • Flip

Bounce is used by default, but you can replace it with your own transition, or with one from the list above.

import { Slide, Zoom, Flip, Bounce } from 'material-react-toastify';
<ToastContainer
transition={Slide}
/>
//...
<ToastContainer
transition={YourCustomTransition}
/>

You get the idea...This can also be done per toast.

toast("hello", {
transition: Slide
})
Edit this page
Previous
« Usage with redux
Next
Define a custom enter and exit transition »
Copyright © 2020 Fadi Khadra