Interface ISnapMutableProps

Mutable properties for the Snap component

interface ISnapMutableProps {
    __mutableProp?: null;
    centered?: boolean;
    direction?: "horizontal" | "vertical";
    duration?: TSnapDuration;
    easing?: TEasingType;
    edgeFriction?: number;
    followSwipe?: boolean;
    followWheel?: boolean;
    freemode?: boolean;
    friction?: number;
    gap?: string | number;
    grabCursor?: boolean;
    lerp?: number;
    loop?: boolean;
    shortSwipes?: boolean;
    shortSwipesDuration?: number;
    shortSwipesThreshold?: number;
    slides?: false | (HTMLElement | SnapSlide)[];
    stickOnResize?: boolean;
    swipe?: boolean;
    swipeAxis?: "auto" | "x" | "y";
    swipeFriction?: boolean;
    swipeLerp?: number | false;
    swipeMinTime?: number;
    swipeSpeed?: number;
    swipeThreshold?: number;
    wheel?: boolean;
    wheelAxis?: "auto" | "x" | "y";
    wheelSpeed?: number;
}

Hierarchy (View Summary)

Properties

__mutableProp?: null
centered?: boolean

Centered slides

false
direction?: "horizontal" | "vertical"

Sliding direction

'horizontal'
duration?: TSnapDuration

Change slide duration

500
easing?: TEasingType

Easing type for timelines

EaseOutCubic
edgeFriction?: number

Maximum friction between the final slide and the maximum translation value. From 0 to 1. The higher value the more resistance is applied.

0.85
followSwipe?: boolean

If disabled, then slider will be animated only when you release the finger, it will not move while you hold your finger on it.

true
followWheel?: boolean

If disabled, then slider will be animated only when you stop scrolling the wheel.

true
freemode?: boolean

Disables friction and snapping to the nearest slide.

false
friction?: number

Friction that makes the slides tend to the nearest slide magnet. The value is a number between 0 and 1 which is multiplied by the lerp value. 0 disables friction

0.15
gap?: string | number

The gap between slides. Supports css units like px, rem, vw, vh, svh.

0
grabCursor?: boolean

User will see the "grab" cursor when hovering and "grabbing" when swiping

false
lerp?: number

Linear interpolation factor for smooth coordinates updates.

0.2
loop?: boolean

Detects if need to loop the progress

false
shortSwipes?: boolean

When true, swipes shorter than shortSwipeDuration can trigger slide change. Short swipes work only when followSwipe is true.

true
shortSwipesDuration?: number

Short swipe maximum duration

300
shortSwipesThreshold?: number

Minimum distance in pixels to trigger slide change for short swipes

30
slides?: false | (HTMLElement | SnapSlide)[]

Slides instances. If false, all container's children will be considered as slides.

false
stickOnResize?: boolean

Stick to the nearest slide on window resize

true
swipe?: boolean

Enable or disable swipe events

true
swipeAxis?: "auto" | "x" | "y"

Swipe axis

'auto'
swipeFriction?: boolean

Defines if friction is allowed when swiping. Doesn't work with short swipes or when when followSwipe is false

false
swipeLerp?: number | false

Linear interpolation factor for smooth progress updates during swipe move. false means that the main lerp option will be used

vevet.mobile ? 1 : 0.6

swipeMinTime?: number

Minimum time in milliseconds to trigger swipe move.

0
swipeSpeed?: number

Speed factor for swipe movements

1
swipeThreshold?: number

Length in pixels that must be swiped to trigger swipe start.

5
wheel?: boolean

Enable or disable mouse wheel events for progress control

false
wheelAxis?: "auto" | "x" | "y"

Wheel axis

'auto'
wheelSpeed?: number

Speed factor for mouse wheel movements

1