Animation libraries
Drop into @vysmo/animations, GSAP, Motion,
Anime.js, or any library that accepts a (t: number) => number.
The shape is the universal contract.
A curated catalog of easings, parametric builders (spring, bezier, rough, wiggle, smooth, gravity, breathe), and modifiers (reverse, mirror, yoyo). CSS export via toCSSLinear. Pure math, zero platform assumptions.
$ pnpm add @vysmo/easings View on GitHub Cubic (t³). Workhorse default — CSS's ease is close to power2.out.
Hand the easing function to @vysmo/animations,
or sample it once and ship a CSS linear() value.
import { animate } from "@vysmo/animations";
import { power2Out } from "@vysmo/easings";
animate({
from: 0,
to: 1,
duration: 600,
ease: power2Out,
onUpdate: (v) => element.style.opacity = String(v),
}); import { toCSSLinear } from "@vysmo/easings/css";
import { spring } from "@vysmo/easings";
const ease = spring.with({ stiffness: 220, damping: 18 });
document.documentElement.style.setProperty(
"--ease-pop",
toCSSLinear(ease, 32),
);
Drop into @vysmo/animations, GSAP, Motion,
Anime.js, or any library that accepts a (t: number) => number.
The shape is the universal contract.
toCSSLinear(ease, 32) samples any curve into a
CSS Easing Functions Level 2 linear() value —
springs and bouncing curves, native to CSS.
Pair with @vysmo/scroll to ease scroll
progress before driving a transition or transform. Linear
scroll feels mechanical; eased scroll feels designed.
anticipate, back, elastic
and the spring builder give you the wind-up and
overshoot vocabulary used in Framer Motion / GSAP without their
dependencies.
Export a cubic-bezier() from any design tool and
feed it to bezier(p1x, p1y, p2x, p2y). Same curve
in code, no rounding drift across the chain.
Use defineEasing / defineParametricEasing
to wrap your own math with the same metadata, exact-endpoint
guarantee, and parametric .with(...) shape as the
built-ins.