Interface ISwipeMutableProps

interface ISwipeMutableProps {
    __mutableProp?: true;
    axis?: null | "x" | "y";
    bounceDuration?: number;
    bounds?: null | (coords: ISwipeCoords) => null | ISwipeAxes;
    canBounce?: () => boolean;
    directionThreshold?: number;
    edgeSwipeThreshold?: number;
    enabled?: boolean;
    grabCursor?: boolean;
    inertia?: boolean;
    inertiaBounceEase?: number;
    inertiaDecay?: number;
    inertiaDistanceModifier?:
        | null
        | (distance: ISwipeVec3) => null | ISwipeVec3;
    inertiaDistanceThreshold?: number;
    inertiaDuration?: (distance: number) => number;
    inertiaEasing?: TEasingType;
    inertiaRatio?: number;
    inertiaThreshold?: number;
    maxVelocity?: ISwipeVec3;
    minTime?: number;
    overflow?: () => number;
    preventEdgeSwipe?: boolean;
    preventTouchMove?: boolean;
    ratio?: number;
    recalculateBoundsOnInertia?: boolean;
    relative?: boolean;
    requireCtrlKey?: boolean;
    snap?: null | () => null | ISwipeAxes;
    snapRadius?: null | number;
    threshold?: number;
    velocityModifier?: false | (velocity: ISwipeState) => ISwipeState;
    willAbort?: (props: ISwipeCanMoveArg) => boolean;
}

Hierarchy (View Summary)

Properties

__mutableProp?: true
axis?: null | "x" | "y"

Primary swiping axis.

null
bounceDuration?: number

Duration of the bounce-back timeline when movement exceeds bounds and inertia does not run.

250
bounds?: null | (coords: ISwipeCoords) => null | ISwipeAxes

Movement limits per axis. Unset axis is unbounded.

null
canBounce?: () => boolean

Determines whether the swipe is allowed to bounce back.

() => true
directionThreshold?: number

Minimum swipe distance (px) for directional callbacks.

50
edgeSwipeThreshold?: number

Edge swipe threshold (px) from the left/right edge.

20
enabled?: boolean

Enables or disables swipe events.

true
grabCursor?: boolean

Shows "grab" and "grabbing" cursors during interaction.

false
inertia?: boolean

Enables release inertia (RAF-based decay).

false
inertiaBounceEase?: number

Easing factor for pulling inertia back inside bounds (per frame, FPS-independent).

0.3
inertiaDecay?: number

Inertia velocity decay per frame (higher = stops sooner).

0.05
inertiaDistanceModifier?: null | (distance: ISwipeVec3) => null | ISwipeVec3

Inertia distance modifier. Called when inertia distance is predicted but not yet started.

null
inertiaDistanceThreshold?: number

Timelined inertia is not supported anymore.

inertiaDuration?: (distance: number) => number

Timelined inertia is not supported anymore.

inertiaEasing?: TEasingType

Timelined inertia is not supported anymore.

inertiaRatio?: number

Multiplier applied to release velocity.

1
inertiaThreshold?: number

Minimum release speed to start inertia (px/s for x/y, deg/s for angle).

1
maxVelocity?: ISwipeVec3

Max release velocity per axis (coord/ms for x/y, deg/ms for angle). Falsy axis value disables inertia on that axis.

{ x: 7, y: 7, angle: 3 }
minTime?: number

Minimum duration (ms) to trigger swipe move.

0
overflow?: () => number

Rubber-band distance past bounds (px for x/y, degrees for angle).

() => 50
preventEdgeSwipe?: boolean

Prevents edge swiping (iOS swipe-back gesture).

true
preventTouchMove?: boolean

Prevents touchmove event.

true
ratio?: number

Swipe movement scale.

1
recalculateBoundsOnInertia?: boolean

Enable bounds recalculation when inertia is active

true
relative?: boolean

Calculates coordinates relative to the container.

false
requireCtrlKey?: boolean

Requires Ctrl key for swipe (mouse only).

false
snap?: null | () => null | ISwipeAxes

Snap targets per axis in movement space.

null
snapRadius?: null | number

Max distance to a snap target (same units as the axis). Falsy = no radius limit.

null
threshold?: number

Minimum swipe distance (px) to trigger swipe start.

5
velocityModifier?: false | (velocity: ISwipeState) => ISwipeState

Timelined inertia is not supported anymore.

willAbort?: (props: ISwipeCanMoveArg) => boolean

Returns true to abort before the swipe starts (after threshold / axis checks).

() => false