Exit Animations
Animations that trigger when elements are about to be removed
Basic Usage
Create exit animations by using the out direction with any base animation:
Overview
Exit animations are CSS animations that transition elements to a final "exit" state. These classes provide the animation styles, but don't handle any DOM removal logic - you'll need to combine them with UI libraries or custom code to manage element removal:
Each element will animate from its default state to its exit state (the value after -out-). For example:
motion-opacity-out-0animates fromopacity(100%)toopacity(0)motion-translate-y-out-100animates fromtranslateY(0)totranslateY(100%)motion-blur-out-mdanimates fromblur(0)toblur(md)motion-scale-out-75animates fromscale(100%)toscale(75%)
Available Properties
The following properties can be animated on exit:
Customizing Exit Animations
You can customize exit animations using modifiers. See the applying modifiers guide for more details:
Combining Exit Animations
Stack multiple exit animations to create complex effects: