j

    Joost Klitsie

    9 months ago
    Hello dear people! I wanted to have some fun with Compose for web 🙂 I was wondering, if I wanted to have an animation, for example an opacity animation from 0 to 1, should I use CSS or can I use compose animation methods? (like on jetpack compose)
    a

    Akif Abasov [JB]

    9 months ago
    only css is performant enough in DOM version of compose
    It’s not because of compose itself, but because of how DOM works
    j

    Joost Klitsie

    9 months ago
    I thought so, i made it work using simple transitions 😃
    a

    Akif Abasov [JB]

    9 months ago
    there is also web animation api with keyframes
    j

    Joost Klitsie

    9 months ago
    I was struggling a bit with that to be honest, if I have this:
    Div(attrs = {
        style = {
            animation with keyframes?
        }
    }) {
        content...
    }
    How would I set up this animation with keyframes? 🙂 Do you per chance know?
    a

    Akif Abasov [JB]

    9 months ago
    You need to define it in StyleSheet