keyframes!() { /* proc-macro */ }Expand description
Define keyframe sequences for Motion.
keyframes! {
pub FADE_UP = {
from: { opacity: 0, y: 2 },
60%: { opacity: 1 },
to: { y: 0, background: card },
}
}
let card = div().motion("enter", Motion::new(&FADE_UP).duration_ms(250).easing(Easing::EaseOut));Offsets are from, to or percentages. Animatable properties: opacity,
x / y (offsets from the laid-out position), width, height, radius,
background, color and border_color, with the same values as styles!.