Overview
Interaction options control how users can interact with the slider through touch gestures, mouse dragging, and other input methods.Options
Activates input detection for touch devices.
Touch is enabled by default for better mobile experience.
Changing slides by dragging them with mouse.
This is disabled by default. Enable it for desktop drag interaction.
Swipe or drag will not be triggered if the angle is not inside the range when set.Set to
false to disable angle detection.This helps prevent accidental swipes when scrolling vertically on mobile.
Prevent next transition while slider is transforming.Available since v2.9.1.
Enable this to prevent interaction spam and ensure smooth transitions.
Prevent page from scrolling on
touchmove.'auto': The slider will first check if the touch direction matches the slider axis, then decide whether to prevent page scrolling'force': The slider will always prevent page scrollingfalse: Don’t prevent page scrolling
Touch and Drag Behavior
Basic Touch Configuration
Default mobile-friendly setup:Desktop Drag Support
Enable dragging on desktop:Vertical Slider Configuration
For vertical sliders, adjust swipe angle:Mobile Considerations
Optimal Mobile Settings
Responsive Touch Behavior
Preventing Scroll Conflicts
For horizontal sliders in scrollable pages:Advanced Examples
High-Performance Configuration
Prevent rapid interactions:Full-Page Slider
Take over scroll completely:Nested Sliders
Configure parent and child differently:Custom Gesture Handling
While tiny-slider handles most touch interactions automatically, you can listen to drag events:Responsive Configuration
Adjust interaction behavior at different breakpoints:Best Practices
1. Mobile-First Approach
Always enable touch for mobile devices:2. Smart Scroll Prevention
Use'auto' for most cases:
3. Prevent Interaction Spam
Enable action prevention during transitions:4. Test on Real Devices
Touch behavior can differ between devices. Always test on:- iOS devices (iPhone, iPad)
- Android devices (various manufacturers)
- Tablets with touch screens
- Desktop with touch displays