davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.8k stars 175 forks source link

New option value: slidesToScroll: `auto` #330

Closed davidjerleke closed 2 years ago

davidjerleke commented 2 years ago

Feature request is related to

Is your feature request related to an issue?

It's cumbersome for users to set different slidesToScroll values for different breakpoints.

Describe the solution you'd like

New option value: slidesToScroll: 'auto' - Embla will automatically group slides for you depending on how many slides fit within the viewport.

const options = { slidesToScroll: 'auto' }
const embla = EmblaCarousel(emblaNode, options)
davidjerleke commented 2 years ago

Released with v7.