svaul v2 is a ground-up rebuild of the motion core. It answers to momentum, not keyframes: fling it and the close speed follows your throw, catch it mid-close, reverse it on a dime. Every close is interruptible by construction, the whole system is declarative now (CSS transitions + variables, no per-frame JavaScript).
More:
- Background scale is a theme-able stylesheet (removed inline styles
bodymutations). - Snap points now take
%/rem/vh/vw/calc(). - More sturdier scroll-lock, focus-trap, and modal
inert.
Breaking
- Enter/exit are CSS transitions, not keyframes —
@keyframes svaul-drawer-*removed. - Removed the
scrollLockTimeoutprop. - Background scale is driven by CSS variables +
data-*attributes, not inlinetransform/filterorbody.background. - Snap points: a number
> 1is pixels (≤ 1stays a fraction). - Scroll-lock now locks
<html>in addition to<body>.
Details in #1.