Skip to content

v2.0.0

Latest

Choose a tag to compare

@harshmandan harshmandan released this 20 Jul 08:21
· 1 commit to main since this release
514a77b

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 body mutations).
  • 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 scrollLockTimeout prop.
  • Background scale is driven by CSS variables + data-* attributes, not inline transform/filter or body.background.
  • Snap points: a number > 1 is pixels (≤ 1 stays a fraction).
  • Scroll-lock now locks <html> in addition to <body>.

Details in #1.