https://kotlinlang.org logo
c

CLOVIS

07/02/2022, 1:50 PM
What's the recommended way of doing animations in Compose Web?
b

Big Chungus

07/02/2022, 2:44 PM
Good old css keyframes for dom api
c

CLOVIS

07/02/2022, 3:14 PM
That just means I have to write my own API for JS animations, right? 😇
b

Big Chungus

07/02/2022, 3:14 PM
No, that just means regular css keyframes
And then applying the class to components you want to animate
c

CLOVIS

07/02/2022, 4:00 PM
I don't have a need for anything more complicated than simple fades, and honestly I'm amazed how easy it is to improvise things like this with Coroutines + Compose
j

jw

07/02/2022, 4:01 PM
The transition API makes fades a one liner
And it won't run if the content is currently visible
c

CLOVIS

07/02/2022, 4:02 PM
I see, I'll take a look, thanks 🙂
3 Views