Overview
Mates motion splits into two layers: WAAPI presets (animationPresets) for enter/exit show-hide via animatedIf, animatedX, and animatedRouter; and CSS keyframes (keyframes()) that inject a named @keyframes rule and return a string for style.animation.
Presets are plain { keyframes, options } objects — swap them at runtime. Defaults on animatedIf are fade in 250ms / fade out 200ms when omitted.
Presets vs keyframes
|
API
|
Returns
|
Use with
|
|---|---|---|
animationPresets.*
| AnimationPreset |
animatedIf / animatedRouter config.
|
keyframes(name, stops)
| string (CSS name) |
style.animation / stylesheets.
|
animatedIf
| Directive | See /docs/directives for the full conditional API. |
Preset enter / exit
slideIn + fadeOut via animationPresets on animatedIf.
CSS keyframes name
keyframes() returns a scoped animation name for inline style.animation.