Optionalprops: ISwipeStaticProps & ISwipeMutableProps & Partial<OptionalonCallbacks: Partial<Absolute path length since swipe start.
Retrieves the module's callbacks instance.
Coordinate reference element.
Full coordinate snapshot (pointer space + movement).
Current pointer position.
Offset from swipe start to current pointer position.
Whether overflow bounce-back timeline is running.
Whether release inertia is running.
Checks if the module has been destroyed.
Whether a swipe gesture is in progress.
Total displacement in movement space (use for element transforms).
The name of the module, derived from the class name
Optional prefix for classnames used by the module
Previous pointer position.
Current properties. Do not mutate these directly, use updateProps instead.
Current scale modifier.
Pointer position at swipe start.
Offset from previous to current pointer position.
Protected_addAdds a class name on an element, and keeps track of it for removal when the module is destroyed.
The target DOM element.
The class name to toggle.
Protected_cnHelper function to generate classnames with the module's prefix.
The class names to generate.
A string of class names with the module's prefix applied.
Protected_destroyDestroys the component
Returns default mutable properties.
Primary swiping axis.
Duration of the bounce-back timeline when movement exceeds bounds and inertia does not run.
Movement limits per axis. Unset axis is unbounded.
Determines whether the swipe is allowed to bounce back.
Minimum swipe distance (px) for directional callbacks.
Edge swipe threshold (px) from the left/right edge.
Enables or disables swipe events.
Shows "grab" and "grabbing" cursors during interaction.
Enables release inertia (RAF-based decay).
Easing factor for pulling inertia back inside bounds (per frame, FPS-independent).
Inertia velocity decay per frame (higher = stops sooner).
Inertia distance modifier. Called when inertia distance is predicted but not yet started.
Multiplier applied to release velocity.
Minimum release speed to start inertia (px/s for x/y, deg/s for angle).
Max release velocity per axis (coord/ms for x/y, deg/ms for angle).
Falsy axis value disables inertia on that axis.
Minimum duration (ms) to trigger swipe move.
Rubber-band distance past bounds (px for x/y, degrees for angle).
Prevents edge swiping (iOS swipe-back gesture).
Prevents touchmove event.
Swipe movement scale.
Enable bounds recalculation when inertia is active
Calculates coordinates relative to the container.
Requires Ctrl key for swipe (mouse only).
Snap targets per axis in movement space.
Max distance to a snap target (same units as the axis). Falsy = no radius limit.
Minimum swipe distance (px) to trigger swipe start.
Returns true to abort before the swipe starts (after threshold / axis checks).
Returns default static properties.
Determines which mouse buttons trigger events.
See MouseEvent.button.
Event listener container.
Disable user selection on drag.
Required pointer count to activate swiping.
An element that triggers the swipe start. Calculations remain relative to the container regardless of this element.
Protected_handleCalculate swipe bounds
Cancel bounce
Cancel inertia
Destroys the module, cleaning up resources, callbacks, and event listeners.
Adds a custom callback to the module.
The event type to listen for (e.g., 'props', 'destroy').
The function to execute when the event is triggered.
Additional settings for the callback.
Adds a callback on the module's destruction.
The function to execute during destruction.
Apply bounce overflow animation
OptionaltargetDuration: numberSets programmatic displacement in movement space.
Reapplies rubber, snap, emits move, and cancels overflow bounce.
Sets programmatic scale in movement space.
Optionally zooms toward an origin point and emits move.
Manages swipe interactions:
Notes:
Documentation