Settings
All settings can be configured when initializing Slick or via data attributes. Below is the complete list of available options.Basic Usage
Data Attribute Configuration
In Slick 1.5+, you can add settings using thedata-slick attribute:
Configuration Options
Enables tabbing and arrow key navigation. Unless
autoplay: true, sets browser focus to current slide (or first of current slide set, if multiple slidesToShow) after slide change. For full a11y compliance enable focusOnChange in addition to this.Adapts slider height to the current slide.
Change where the navigation arrows are attached. Accepts Selector, htmlString, Array, Element, or jQuery object.
Change where the navigation dots are attached. Accepts Selector, htmlString, Array, Element, or jQuery object.
Enable Next/Prev arrows.
Enables syncing of multiple sliders. Pass a jQuery selector or element.
Enables auto play of slides.
Auto play change interval in milliseconds.
Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts.
Side padding when in center mode. Accepts values in px or %.
CSS3 easing function for transitions.
Custom paging templates. Accepts a function that returns HTML for each dot.
Show current slide indicator dots.
Class name for slide indicator dots container.
Enables desktop dragging with mouse.
jQuery animate() fallback easing function.
Resistance when swiping edges of non-infinite carousels. Value between 0 and 1.
Enables fade transition between slides instead of slide animation.
Enable focus on selected element when clicked.
Puts focus on slide after change for improved accessibility.
Enables infinite looping of slides.
Slide index to start on (zero-based).
Lazy load technique. Accepts:
'ondemand': Loads image as soon as you slide to it'progressive': Loads one image after the other when page loads
Responsive settings use mobile first calculation.
Allows you to select a node or customize the HTML for the “Next” arrow. Can be an HTML string, jQuery selector, or DOM node.
Pauses autoplay when a dot is hovered.
Pauses autoplay when slider is focused.
Pauses autoplay when slider is hovered.
Allows you to select a node or customize the HTML for the “Previous” arrow. Can be an HTML string, jQuery selector, or DOM node.
Width that responsive object responds to. Options:
'window': Responds to window width'slider': Responds to slider width'min': Responds to the smaller of the two
Array of objects containing breakpoints and settings objects. Enables settings at given breakpoint. Set
settings to "unslick" to disable slick at a given breakpoint.Setting this to more than 1 initializes grid mode. Use
slidesPerRow to set how many slides should be in each row.Change the slider’s direction to become right-to-left.
Slide element query selector.
With grid mode initialized via the rows option, this sets how many slides are in each grid row.
Number of slides to scroll at a time.
Number of slides to show at a time.
Transition speed in milliseconds.
Enables touch swipe on mobile devices.
Swipe to slide irrespective of slidesToScroll setting.
Enables slide moving with touch.
To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider.
Enable/Disable CSS Transitions.
Enable/Disable CSS Transforms.
Disables automatic slide width calculation. Useful for slides with varying widths.
Vertical slide direction.
Changes swipe direction to vertical.
Ignores requests to advance the slide while animating.
Set the zIndex values for slides, useful for IE9 and lower.
Responsive Configuration Example
Theresponsive option allows you to define different settings at different breakpoints: