Interface SwipeConfig

Source
Expand description

Configuration for swipe gestures.

interface SwipeConfig {
    bounceOpacityThreshold?: number;
    bounceSpringConfig?: SpringConfig;
    directions?: SwipeDirection[];
    enabled?: boolean;
    threshold?: number;
}

Properties§

Source§

bounceOpacityThreshold?: number

Threshold for backdrop opacity correction during bounce.

default
0.05
Source§

bounceSpringConfig?: SpringConfig

Spring config for bounce-back animation after failed swipe.

default
{ stiffness: 200, dampingRatio: 0.5, duration: 700 }
Source§

directions?: SwipeDirection[]

Array of swipe directions that should close the modal.

default
[]
Source§

enabled?: boolean

Whether swipe gestures are enabled.

default
true
Source§

threshold?: number

Distance in pixels to trigger dismiss by swipe.

default
100