zillow / react-slider

Accessible, CSS agnostic, slider component for React.
https://zillow.github.io/react-slider
MIT License
883 stars 231 forks source link

Pass state with renderMark's callback #276

Open johnlahut opened 1 year ago

johnlahut commented 1 year ago

Is it possible to access the value as part of the mark's render function?

I would like to style marks depending on the value that the mark represents.

chrisfeghali commented 1 year ago

Hi @johnlahut, came across this same issue. You can access the value with props.key.

renderMark={(props) => <div {...props}>{props.key}</div>}