mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.03k stars 32.3k forks source link

Allow custom transition props in MUI transitions components #36065

Open aryanshridhar opened 1 year ago

aryanshridhar commented 1 year ago

Duplicates

Latest version

Summary 💡

Hey folks, How can I add custom transition styles to existing implementation of MUI Transition components (Fade, Collapse etc)

After reading the docs around the same, I inferred that the MUI Transition components are built upon react-transition-group which provide a flexibility to add styles depending upon the transition state (entering,exiting), but these are not exposed by MUI?

How can I achieve the same by adding some sort of prop in MUI Transition components?

Examples 🌈

I got a stackoverflow thread around the same but with mui v5 it complains about the ref about being null - https://stackoverflow.com/questions/49323091/create-custom-transition-in-material-ui-next

Motivation 🔦

Adding custom transition style provides a flexibility by overriding the existing style of Fade component. (Suppose, I want to add a tansform: translate3d(x,y,z)) styles to my Fade component.

michaldudak commented 1 year ago

@siriwatknp or @mnajdova, you'll likely know this better than me.