Closed tgmarinho closed 6 months ago
Hello @tgmarinho, thank you for reaching out! Please be aware that this feature is merged into main branch, but no yet fully released to public. If you would like to try out the feature before next release you can clone this repo and use example app. Let me know if this answer your question.
Hello again, @tgmarinho! Can you check with the latest (v4.5.1) version, please?
Closing due to lack of author's response, and the issue is most likely outdated with the latest version.
Closing due to lack of author's response, and the issue is most likely outdated with the latest version.
Is this feature still disabled in the release version, as it does not render the custom marker.
"@react-native-community/slider": "^4.5.2",
<Slider
StepMarker={({ stepMarked }) => {
return stepMarked ? (
<Svg height={20} width={20}>
<Polygon points="0 0 10 10 20 0" fill="#FFA300" />
</Svg>
) : null;
}}
className="w-full"
onSlidingComplete={onSlidingComplete}
onValueChange={onValueChange}
step={1}
value={progress}
minimumValue={min}
maximumValue={max}
minimumTrackTintColor={minimumTrackTintColor}
maximumTrackTintColor={maximumTrackTintColor}
tapToSeek
/>
Hello @AyoCodess! No, this feature is "experimental", which means may contain some bugs, or inconveniences, but it is enabled. For how to utilize these new props please see example app.
Looking at your code, I assume it should work (comparing to how StepMarker
should be used), however, I'm unable to provide you with any more suggestions or tips/answers, as I don't know what these Svg
and Polygon
components are.
If you could provide me with some reusable code I can take a look and verify.
I figured it out, thanks.
"@react-native-community/slider": "^4.5.0", "react-native": "0.73.2", "expo": "^50.0.0",
How to add a custom step marker on slider 4.5.0?