Overview
Advanced options provide fine-grained control over slider behavior, including looping, animations, lazy loading, and performance optimizations.Loop and Rewind
Moves throughout all the slides seamlessly.Creates cloned slides at the beginning and end for infinite scrolling effect.
Loop is true by default in carousel mode, false in gallery mode.
Moves to the opposite edge when reaching the first or last slide.
When rewind is true, loop is automatically set to false.
Animation Options
Name of intro animation class (for gallery mode).
Name of outro animation class (for gallery mode).
Name of default animation class (for gallery mode).
Time between each gallery animation (in “ms”).
Lazy Loading
Enables lazyloading images that are currently not viewed, thus saving bandwidth.
The CSS selector for lazyload images.Available since v2.9.1.
Nested Sliders
Define the relationship between nested sliders.
Performance Options
Indicate whether the slider will be frozen (controls, nav, autoplay and other functions will stop work) when all slides can be displayed in one page.
When there are 3 or fewer slides and items is 3, the slider will be frozen automatically.
Disable slider.
The initial index of the slider.
Callback to be run on initialization.
Save browser capability variables to localStorage and without detecting them every time the slider runs.
This improves performance by caching browser feature detection results.
Nonce attribute for inline style tag to allow slider usage without
unsafe-inline Content Security Policy source.Defines options for different viewport widths.
Breakpoints behave like
(min-width: breakpoint) in CSS. Undefined options inherit from smaller breakpoints.Advanced Examples
Lazy Loading Images
Custom Lazy Load Selector
Gallery Mode with Custom Animations
Nested Sliders Example
Initialization Callback
Responsive Disable/Enable
Content Security Policy (CSP)
Performance Tips
1. Enable Local Storage
2. Use Lazy Loading for Images
3. Freeze When Not Needed
4. Disable on Mobile if Not Needed
5. Optimize Responsive Breakpoints
Complex Responsive Configuration
Optimization Checklist
- ✅ Use
lazyloadfor image-heavy sliders - ✅ Enable
useLocalStoragefor better performance - ✅ Set
freezable: trueto auto-disable when not needed - ✅ Use
disableoption on mobile if slider isn’t necessary - ✅ Implement
onInitcallback for custom initialization logic - ✅ Use
nonceattribute for strict CSP environments - ✅ Configure
startIndexto begin at a specific slide - ✅ Test nested sliders thoroughly (inner before outer)
- ✅ Use responsive breakpoints efficiently
- ✅ Consider
preventActionWhenRunningto prevent spam