githuboftigran / rn-range-slider

A native slider with range
MIT License
242 stars 135 forks source link

The possibility of showing steps separators #93

Closed animaksy closed 3 years ago

animaksy commented 3 years ago

Hi,

It would be great if the control will provide step separators on the line, like circles. In case of large steps, lets say 500, it is confusing for the user how to drag and where to stop. Is this a possible addition?

githuboftigran commented 3 years ago

@animaksy , didn't really understand. How can 500 circle step separators fit in screen?

kmkrtich commented 3 years ago

@animaksy , didn't really understand. How can 500 circle step separators fit in screen?

I guess issue is about having smooth sliding. For 500 steps of course it's nonsense. It automatically will be smooth. But for cases when we have 4 steps it can be useful to display steps just as a hint for user to click there. My issue with this is following. Step is configured to 50.

0|----------^-------50-----------------100------------------150------------------|200

When I click to the area mentioned by ^ symbol it doesn't snip to any of edge values 0 or 50.

AniMaksyan commented 3 years ago

@githuboftigran, my case is the same as @kmkrtich described.

AniMaksyan commented 3 years ago

@githuboftigran , do you any suggestion for this case?

githuboftigran commented 3 years ago

@AniMaksyan, @kmkrtich jan, there is a prop: renderRail, which should be a function to render a component to be displayed as rail. You can add the separators to that component.