Skip to content

Desktop drag

button, a, input, textarea, select, label, [contenteditable], [data-scrollsheet-no-drag], [data-vaul-no-drag]

Mouse input (pointerType: 'mouse') can drag non-interactive panel content. Release velocity is estimated from the last ~100ms of pointer samples, so a flick travels beyond the cursor. Modal touch and pen gestures normally use native scroll-snap. Non-modal sheets and handleOnly gestures on the handle use the pointer engine.

The elements above opt out automatically; add data-scrollsheet-no-drag to anything else that needs the same treatment.

Trackpad and wheel input use native scroll-snap. For a single-detent sheet, scrollsheet checks closeThreshold after wheel input settles and corrects the snap result when needed. Wheel dismissal follows the same threshold as dragging.

Multi-detent sheets use native snapping without this correction.

Drag non-interactive panel content with a mouse; release to settle at a detent.