I want one of my smart animated components, a button, to do two things when it is clicked.
Change to a variant - so it goes from the unselected to the selected state.
Trigger the opening of the next overlay
This is so that the user sees the button that they click change briefly before the next overlay opens.
I can do both of these in isolation and I can make it work in a dumber way with an interim screen, but I can’t get it to work in one step. Any advice very welcome!
I’ve been experimenting with this the past few days, and creating an encapsulated variant with a delayed navigation trigger doesn’t seem possible. I can do it without using variants, but that, like you said, feels like the “dumber” way.
I’d love to see if anyone else here has pulled off this use case within a variant, and make it reusable. (The technique I tried was overriding the instance of a variant state for a navigation, and using some smart animation hackiness to force a delay.)