Subscribe on changes!

Transition Component does not end transition on from-to-class when setting class properties

avatar
Jan 9th 2023

enter-to-class is not applied continuously, only for a tick at the end. the proposed solution is correct. If you have CSS order issues, make the from class of higher specificity. And yes, with tailwind that means you would have to create a class with @apply in this specific case. In others, whe the transitioned value is inherited/default (i.e. opacity: 1, you would not have to do that.

avatar
Jan 9th 2023

Okay. Thanks for your explanation. Feels like it needs one more css class for after like from-class, from-to-class, "from-to-after". Im not sure the point of from-to-class removing on transition end but yeah relying on css specificity for Transition component is not ideal.

The actual use case is a slide up menu from the bottom of the screen in mobile view