Capítulo 240 de 411
Instantly snaps targets to match a previously captured state, then animates backward to their current (new) state — the core method of the FLIP pattern.
| Parameter | Type | Description |
|---|---|---|
| state | FlipState | from Flip.getState() |
| vars | Object | standard tween vars (duration, ease, onComplete...) |
Returns: a Timeline.
const state = Flip.getState(".details, .full-screen");
detailsElement.classList.toggle("active"); // mutate DOM/layout
Flip.from(state, { duration: 1, ease: "power1.inOut" });
Flip.from().width/height by default; set scale: true to use transform scaling instead (cheaper, but can distort content differently).state input.from() in almost all cases (see next chapter).