Slick Carousel smooth scrolling
Asked Answered
S

2

7

I have been using the slick carousel for a while, but I was curious if it was possible to tweak the carousel to get a smooth scrolling effect, as the same effect you get when you scroll vertically on your phone (on a given web page fx.).

In other words, I want the slick carousel to scroll in a variable speed, have a continuously flow, and will eventually not automatically head back to the start of a carousel/element, when you are not touching the carousel anymore.

Thanks

Sophi answered 25/7, 2018 at 13:43 Comment(1)
Related github request github.com/kenwheeler/slick/issues/1665Sophi
C
11

For Smooth/Continous Scrolling

$('.continuous').slick({ speed: 9000, autoplay: true, autoplaySpeed: 0, cssEase: 'linear', slidesToShow: 1, slidesToScroll: 1, variableWidth: true,

});

Chokebore answered 23/10, 2020 at 10:49 Comment(1)
Fiddle showing technique: jsfiddle.net/qu6cdbvtLaryssa
S
3

As it says in the github-thread, I have linked in the comment to my question, the latest version of Slick does not support smooth scrolling.

I saw that Flickity and Swiper had good support for that, which I did some experiments with, but due to performance issues with both of them, I ended up making a simple horizontal div with multiple child-elements inside. That was the winning solution for me.

Source: https://codeburst.io/how-to-create-horizontal-scrolling-containers-d8069651e9c6

Cheers!

Sophi answered 31/7, 2018 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.