useFlip(targetRef, opts?) | (ref, opts?) => UseFlipReturn | Run a FLIP transition on an element (powers TxFlipOverlay) |
useAutoResize(targetRef, opts?) | (ref, opts?) => UseAutoResizeReturn | Measure and transition size changes (powers TxAutoSizer) |
stepSpring(position, velocity, target, spring, dt) | (position, velocity, target, spring, dt) => [number, number] | Step a value along a spring ({ stiffness, damping, mass? }, dt in seconds) from your own frame loop, keeping velocity when the target moves; usable as useJellyIndicator's glide integrate |
solveSpring(position, velocity, target, spring, t) | (position, velocity, target, spring, t) => [number, number] | The same spring in closed form: the exact position and velocity at any t (seconds); for scrubbed timelines, frame-by-frame renders, and asserting where a motion is at a moment |
createSpringTrack(spring, initial) | (spring, initial) => { retarget(t, target), sample(t) } | A spring track retargeted along the way: each retarget keeps the position and velocity of that moment, and sample(t) reads any moment exactly, in any order |
useMorphBox(box, content, opts?) | (box, content, opts?) => { morphing, settle } | A box that springs to its content's natural size, keeping its speed when the size changes mid-flight; the size engine of TxMorph and TxTransitionSmoothSize |
resolveGsapEase(value) | (value: string) => string | ((t: number) => number) | Convert an ease before handing it to GSAP: spring(...) and cubic-bezier(...) become progress functions (GSAP knows neither and silently uses its default); GSAP names pass through |
resolveCssEase(spec) | (spec: string | undefined | null) => (t: number) => number | Evaluate a CSS timing function in JS: cubic-bezier(...), evenly spaced linear(...), and linear / ease / ease-in / ease-out / ease-in-out; anything else degrades to clamped linear, never null. Cached per spec, safe per frame |
createSpringEase(omega?, zeta?) | (omega = 10, zeta = 0.72) => (t: number) => number | Closed-form underdamped spring normalized to the timeline: overshoots 1, settles, lands on exactly 1. Unlike frame-stepped stepSpring, usable directly as an ease |
parseSpringEase(value) | (value: string | undefined | null) => ((t: number) => number) | null | Parse spring / spring(omega) / spring(omega, zeta); anything else returns null |
createCubicBezier(x1, y1, x2, y2) | (x1, y1, x2, y2) => (t: number) => number | Equivalent to CSS cubic-bezier(); the charts entry's cubicBezier is this function |
parseCubicBezier(value) | (value: string | undefined | null) => [number, number, number, number] | null | Parse a cubic-bezier(...) string; GSAP names, keywords, spring forms, or x controls outside 0, 1 return null |