Animations
k-animate plays CSS classes while an element comes in and goes out. Four are ready to use: fade, slide, scale and pop.
fade
slide
scale
pop
Your own animation, with k-show
Name it, then write CSS for name-in / name-in-from (coming in) and name-out / name-out-to (going out).
I drop in and fly out.
.drop-in, .drop-out { transition: all .35s ease }
.drop-in-from { opacity: 0; transform: translateY(-30px) }
.drop-out-to { opacity: 0; transform: translateX(60px) rotate(6deg) }
Lists: {for … animate slide}
New items slide in, removed ones slide out, and the rest move to their new place.
- Banana
- Mango
- Papaya
- Guava
One after the other: k-animate.after
With k-if / k-else, .after lets the old one leave before the new one comes in. The pages of this demo change the same way: <kreft-view k-animate.after="page">.
♡ Not yet