Skip to content

Slider - evenly spaced values #7539

Closed Answered by vaunus
vaunus asked this question in General
Discussion options

You must be logged in to vote

Never mind, I figured this out. If anyone comes across this, I changed the Chakra slider to a step of 1, then then set 0 as the min, and max to the array length-1 of my array of fixed values which get passed into the wrapper component. Then treat the selected value of Chakra slider as an array index within that array of values to work out what value is selected. The step of 1 between values gives the fixed spacing and then I set the labels to the values in my outer array of values.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vaunus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant