Unsupported directions receive restrained resistance. Canceled
gestures settle to origin and can be grabbed again from their
- current visual position. A committed release calls{' '}
- onDismiss immediately and continues off the
- measured edge if the consumer keeps it mounted.
+ current visual position. Release velocity adjusts a bounded
+ settle duration so quick flicks continue briskly while slow
+ releases remain calm.
+
+
+ A committed release calls onDismiss immediately,
+ then departs beyond the measured edge. If the component stays
+ mounted, onDismissComplete fires once at the final
+ visual target. Committed departure cannot be re-grabbed.
@@ -260,9 +268,10 @@ export function App() {
Interactive children
- Buttons, links, form controls, and text keep their normal
- behavior. Mouse drags do not originate from interactive
- controls.
+ Buttons and links retain taps, while a claimed drag
+ suppresses its release click. Inputs, textareas, selects,
+ contenteditable regions, and descendants marked{' '}
+ data-drag-dismiss-ignore never initiate drag.
@@ -308,12 +317,13 @@ export function App() {
replacement for a semantic dismiss control.
- Use the same application handler from a clearly named button.
- The application decides focus after unmount. Drag Dismiss
- injects no ARIA and invents no keyboard shortcuts.
+ Use a clearly named button for the same application action. If a
+ focused list item is removed, move focus to the next item or the
+ list container in application code. Drag Dismiss injects no
+ ARIA, moves no focus, and invents no keyboard shortcuts.
@@ -328,7 +338,9 @@ export function App() {
data-state="idle|dragging|settling|dismissed",{' '}
data-dismiss-intent="true", and{' '}
data-disabled. Core motion translates only;
- opacity, scale, and rotation remain yours.
+ consumer transform, opacity, scale, and rotation remain yours.
+ The individual CSS translate property is reserved
+ for mechanical drag offset.
@@ -360,7 +372,16 @@ export function App() {
onDismiss
- Called once at commit with {`{ direction }`}.
+ Called exactly once when release commits, before departure.
+
+
+
+ onDismissComplete
+
+ Optional; called once after mounted departure reaches its
+ target, with the same {`{ direction }`}. It
+ does not fire if the consumer unmounts first. Reduced motion
+ preserves commit-before-complete ordering.
@@ -370,6 +391,44 @@ export function App() {
+
+
+
+
Card disappears before departure
+
+ The consumer unmounted from onDismiss. Keep the
+ node mounted and remove it from{' '}
+ onDismissComplete when visual completion
+ matters.
+
+
+
+
Exclude a custom control
+
+ Form editors are protected automatically. Add{' '}
+ data-drag-dismiss-ignore to a slider, map,
+ canvas, editor, or other custom interaction surface.
+
+
+
+
Compose transforms
+
+ Keep scale and rotation in transform. Drag
+ Dismiss uses the independent translate{' '}
+ property, so both remain active.
+
+
+
+
Horizontal gesture conflict
+
+ A surface should generally have one horizontal owner. Choose
+ Drag Dismiss or Swipe Actions, or separate their starting
+ surfaces explicitly.
+
+
+
+
+
@@ -382,8 +441,9 @@ export function App() {
globally.
- A committed callback may unmount immediately and therefore cut
- the optional exit motion short.
+ Unmounting in onDismiss intentionally cuts the
+ departure short; use onDismissComplete when the
+ visual exit must finish.
Physical iOS and Android device QA is pending for this alpha.
@@ -398,7 +458,20 @@ export function App() {
Part of{' '}
NIPE Open Source.
-