Overview
Slick Carousel includes a powerful responsive system that allows you to configure different settings at specific breakpoints. This enables your carousel to adapt seamlessly across devices, from mobile phones to large desktop displays.The Responsive Option
Theresponsive option is an array of objects containing breakpoints and their corresponding settings. This unique and powerful feature lets you customize carousel behavior at different viewport widths.
Array of objects containing breakpoints and settings. Enables different configurations at given viewport widths.
Basic Responsive Configuration
Here’s the example from the Slick Carousel source:How Breakpoints Work
Desktop-First (Default)
By default, Slick uses a desktop-first approach where breakpoints trigger when the viewport is less than the specified width.With desktop-first (default), a
breakpoint: 1024 means the settings apply when the viewport is 1024px or smaller.Mobile-First Approach
Enable mobile-first calculation where breakpoints trigger when the viewport is greater than the specified width.Use mobile-first calculation for responsive settings. When enabled, breakpoints apply when viewport is greater than the specified width.
With mobile-first approach, define your smallest screen settings as defaults and progressively enhance for larger screens.
RespondTo Option
Control what dimension the responsive system measures against.Width that responsive object responds to. Options:
'window'- Respond to browser window width'slider'- Respond to slider container width'min'- Respond to the smaller of window or slider width
When to Use Each RespondTo Mode
window (default)
window (default)
Best for full-width carousels or when your slider should respond to overall viewport changes:
slider
slider
Ideal when your slider is in a container with its own responsive behavior:
min
min
Use when you want the slider to respond to whichever is smaller:
Unslick at Breakpoints
You can completely disable Slick at specific breakpoints by settingsettings to "unslick".
When to Unslick
- On mobile devices where a simple scrollable list works better
- When you have only 1-2 slides on small screens
- To improve mobile performance on content-heavy pages
- When native scrolling provides better UX on small devices
Responsive Configuration Patterns
E-commerce Product Grid
Content Slider with Unslick
Mobile-First Gallery
Testimonial Carousel
Dynamically Updating Responsive Settings
You can change responsive settings after initialization:Breakpoint Event
Slick fires abreakpoint event when a breakpoint is triggered:
The breakpoint event fires after the settings have been applied and the slider has been refreshed.
Common Responsive Breakpoints
Here are common breakpoint values based on popular device sizes:Responsive Best Practices
Start with Mobile
Even when using desktop-first (default), consider the mobile experience first:
- Test on actual devices, not just browser dev tools
- Ensure touch targets are large enough (minimum 44x44px)
- Consider using
"unslick"on very small screens - Disable arrows on mobile if they’re hard to tap
Performance Considerations
- Reduce
slidesToShowon smaller screens to improve performance - Use
lazyLoadmore aggressively on mobile - Consider disabling autoplay on mobile to save battery
- Test animation performance on mid-range devices
Test Across Breakpoints
- Test behavior at exact breakpoint widths (e.g., 768px, 769px)
- Check that settings transition smoothly
- Verify that the
breakpointevent fires correctly - Ensure no layout shifts occur during breakpoint changes
Combine with CSS Media Queries
Use CSS media queries for visual styling while JavaScript handles behavior:
Debugging Responsive Issues
Check Active Breakpoint
You can inspect which breakpoint is currently active:Monitor Breakpoint Changes
Force Breakpoint Refresh
If your slider isn’t responding to window resizes:Window Resize Handling
Slick automatically handles window resize events with a 50ms debounce. From the source code:The 50ms debounce prevents excessive recalculations during window resize. This is optimized for performance while remaining responsive.
Responsive Settings Inheritance
Settings at breakpoints inherit from the base configuration. Only specify what changes:Related Documentation
- Configuration - Complete settings reference
- Accessibility - Responsive accessibility considerations
- Methods - Control sliders dynamically
- Events - Handle breakpoint changes