As a big fan of Duolingo’s animations, I’ve always loved how they bring motion into their app experience.
So I decided to recreate one of their animations using @rive_app ever since I saw Duolingo using it, I’ve wanted to give it a try. 🎨✨
View Transitions with CSS linear() to create a light flicker effect on theme change 💡
[data-theme='light']::view-transition-group(root) {
animation-timing-function: var(--flicker);
}
jus' set a custom timing function on the default animation 👨🍳
bonus: drag switch ✨
a smoother radius transform version using css. no framer motion used here.
for auto height transition using css `grid` inspired by @jh3yy. when collapsed `grid-rows-[0fr]` and expanded `grid-rows-[1fr]`.
and that with `ease-out-cubic` with `300ms` makes it feel just perfect ~