Tutorial
Configuration
How to configure Blaze Slider
See BlazeConfig for all available options and how configuration cascading works.
Example
new BlazeSlider(el, {
all: {
enableAutoplay: true,
autoplayInterval: 2000,
transitionDuration: 300,
slidesToShow: 3,
},
'(max-width: 900px)': {
slidesToShow: 2,
},
'(max-width: 500px)': {
slidesToShow: 1,
},
});How It Works
The all key contains the base configuration. Media query keys override specific properties at different breakpoints.
In the example above:
- Desktop shows 3 slides with autoplay
- Tablets (≤900px) show 2 slides
- Mobile (≤500px) shows 1 slide
All other options (autoplay, transition duration) remain the same across breakpoints.
Media queries use the same syntax as CSS. They're evaluated in order, so place larger breakpoints first.