Optional
props: StaticProps & MutablePropsProtected
_callbacksCallbacks instance
Protected
_coordsSwipe tracking data
Protected
_cursorCursor styles
Protected
_destroyableStores actions that need to be executed when the module is destroyed
Protected
Optional
_inertiaInertia animation
Protected
_isIf swiping has been aborted
Protected
_isTracks whether the module has been destroyed
Protected
_isIf swiping has started
Protected
_pointersPointer event manager
Protected
_propsCurrent properties
Protected
_startInitial swipe coordinates (internal use)
Protected
_startSwipe start time
Protected
_velocitiesVelocity tracking
Accumulated movement
Retrieves the module's callbacks instance.
Event target element
Returns current swipe coordinates
Current coordinate
Difference between start and current coordinates
Indicates if inertia is active
Checks if the module has been destroyed.
Indicates if a swipe is active
The name of the module, derived from the class name
Optional prefix for classnames used by the module
Previous coordinate
Current properties. Do not mutate these directly, use updateProps
instead.
Start coordinate
Difference between start and previous coordinates
Protected
velocityReturns current velocity
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
_decodeParses pointer coordinates relative to the container
Protected
_destroyDestroys the component
Protected
_endApply inertia-based movement
Returns default mutable properties.
Returns default static properties.
Protected
_handleHandles swipe end
Protected
_handleHandles mousemove
event
Protected
_handleProtected
_handleHandles swipe start and tracking
Protected
_handleHandles property updates
Protected
_handleHandles touchmove
event
Protected
_handleHandles touchstart
events
Protected
_moveProtected
_preventPrevents edge swipes if enabled
Protected
_resetReset swipe states
Protected
_setApplies touch-action and cursor styles
Destroy inertia animation
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.
Manages swipe interactions:
Notes:
Documentation