Closed itsgeraldwang closed 4 months ago
Hello @itsgeraldwang, thanks for reaching out!
There is the trackImage
feature which would allow you to replace the track with the image you would have to prepare according to your design.
Another option, more complicated though, would be to use StepMarker
:
Prepare the step marker transparent for each step, with their layout being the height of the track's width,
calculate the difference between the middle step and the thumbs position (by using the value
prop of the thumb and the StepMarker
),
change the style of those steps that are in between the middle and thumb's position, so that the desired gradient is rendered.
Give it a try, or let me know if you have some more questions/issues. Also, if you'll have some findings or conclusions, I'm happy to hear.
Thanks for the response, I'll try playing around with that and get back to you if it works or if I have any other questions.
I was able to get it to work by overlaying a track over the slider itself and adjusting the width of the overlayed track using the value prop from the slider. One more question though:
Is there any way to adjust the styling of the slider button such as size and shape? I see there is a thumb image prop but I would rather style the button through native styling instead of using an image.
Nvm, read through some of the pending issues and looks like button styling isn't a feature yet. I'll mark this as resolved since the original question has been answered, but +1 to having a way to style the thumb!
Ask your Question
See title. I would like to create something like this design. Is it possible with the current features offered?