Skip to main content

BlazeSlider

BlazeSlider is a constructor function that is used for initializing the slider on a div.blaze-slider element

new BlazeSlider(
el: HTMLElement,
blazeConfig?: BlazeConfig
)

The first argument is the div.blaze-slider element on which you want to initialize the slider and the second argument is the blaze-slider configuration


Example: No Config

const el = document.querySelector('.blaze-slider')

const slider = new BlazeSlider(el)

Example: With Config

const el = document.querySelector('.blaze-slider')

const slider = new BlazeSlider(el, {
all: {
slidesToShow: 1,
loop: true,
},
'(min-width: 700px)': {
slidesToShow: 2,
},
'(min-width: 1000px)': {
slidesToShow: 3,
loop: false,
},
})