tajo / react-range

🎚️Range input with a slider. Accessible. Bring your own styles and markup.
https://react-range.pages.dev
MIT License
847 stars 97 forks source link

Linear gradient for marks over whole range #153

Closed Enlitened closed 1 month ago

Enlitened commented 2 years ago

I am trying to create a slider that has a linear gradient that is applied to the whole range. i.e. the first and last few marks appear more transparent than the middle marks.

I have tried changing the z-index on the items rendered in renderTrack and renderMark but the marks always appear on of the track.

Something like this: background: 'linear-gradient(to right, transparent, white, transparent'

Is something like this achievable?

tajo commented 1 month ago

more like a generic css question?