Skip to content

v0.1.4

@KookiKodes KookiKodes tagged this 21 May 08:20
A scrollable surface (drawer body, sheet, panel) that wants drag-to-close
via a dedicated handle should not initiate drag from direct pointer
interaction on its own body — any slight horizontal movement during a
vertical scroll would otherwise trip the pan threshold and commit to a
drag.

Add `dragListener?: boolean` (default `true`). When `false`, drag skips
attaching its own pointerdown listener to the element entirely. Drag
becomes external-only — triggered through `dragControls.start(event)`
from a handle elsewhere. The element itself stays inert to direct
pointer interaction, so the body can remain scrollable.

Mirrors motion-react's prop of the same name. One-time read at
createDrag setup — toggling reactively is intentionally not supported,
matching upstream semantics.

Wired into MOTION_OPT_KEYS so the motion proxy + HOC pick it up. New
regression test asserts no pointer-listener writes when
`dragListener: false` is passed (and onDragStart is never called).

313 browser + 22 SSR tests passing.
Assets 2
Loading