DomDefaultTransition
The DOM's Default transition, Motion's by value: a spring for the transforms, a 0.3 s ease for the
rest, and a 0.8 s tween through more than two keyframes. layer is what DomLive provides.
import * as DomDefaultTransition from "@wardic/dom/DomDefaultTransition"
DomDefaultTransition.transitionFor("x", 100) // { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }
DomDefaultTransition.transitionFor("opacity", 1) // a 0.3 s tweenVariables
keyframes
const keyframes: DefaultTransition.KeyframesTransition;The transition through more than two keyframes, as Motion's keyframesTransition: a 0.8 s tween, eased out.
layer
const layer: Layer.Layer<DefaultTransition.DefaultTransition>;The DOM Environment's DefaultTransition.DefaultTransition.
Functions
transitionFor()
function transitionFor(key, target): Transition;The transition key runs on toward target when its own isn't defined, in the DOM: Motion's.
Parameters
key
string
target
string | number
Returns
Transition