I have a Chakra Slider
<Slider minW="181px" defaultValue={0} onChange={() => console.log('changing')}>
<SliderTrack>
<SliderFilledTrack bg="purple.500" />
</SliderTrack>
<SliderThumb />
</Slider>
I have a ratio state that I would like to use for my slider. The slider should autoplay without manual clicking and dragging the SliderThumb based on the value of the ratio that keeps changing with every render.
const [ratio, setRatio] = useState(0);
useEffect(() => {
setRatio(playedTime / duration);
}, [playedTime, duration]);
However I cannot find an autoplay option in the Chakra docs
Is autofilling the chakra slider with a dynamic value possible?