React-slick: Horizontal stick threshold

Created on 27 Jun 2017  路  6Comments  路  Source: akiran/react-slick

Hi!

I've been try to create an horizontal slider to browse tags on touch devices.

Unfortunately the way it sticks is very aggressive and it makes it difficult to slide to the next tags. You have to slide far into the next tag in order for it to stick to it. See gif below.

slick stick

My slick settings

arrows: false,
infinite: true,
variableWidth: true,
slidesToShow: 1,
slidesToScroll: 1,
swipeToSlide: true,

Question:

Does anyone have a settings, solution or another way to solve this issue?

Thanks!

Most helpful comment

I increased the touchThreshold to 100 and it not works perfect.
Thanks for the help @akiran

All 6 comments

maybe try adding { ..., cssEase: 'ease-in-out', ... }

@WilliamHolmes without knowing what this setting does, I would think that it changing how the animation behaves, and what I'm looking for is how the tags sticks.

Nevertheless, thanks for the suggestion, I will try this out and get back to you.

@WilliamHolmes, sorry I forgot to get back to you.
This does not solve the issue :)

Is it possible for the slider not to stick to items?

Can you try varying touchThreshold setting.
By default it is 5.
Try smaller touchThreshold value and see if it works

Alright @akiran, I'll try this out.

Thanks!

I increased the touchThreshold to 100 and it not works perfect.
Thanks for the help @akiran

Was this page helpful?
0 / 5 - 0 ratings

Related issues

briziel picture briziel  路  3Comments

laveesingh picture laveesingh  路  3Comments

jfamousket picture jfamousket  路  3Comments

BradyEdgar94 picture BradyEdgar94  路  3Comments

PolGuixe picture PolGuixe  路  3Comments