You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow for useSlider hook to specify an initial position and update the slide programatically.
Motivation
I'm building a lightbox with pinch to zoom and I want to use this library but need to open a photo at any position and also need to update the position programatically.
From an API perspective, I think the changeSlide function should accept either the requested slide index, or a nested function with the current slide index as an argument.
e.g.
changeSlide(3)// go to slide #4changeSlide((currentSlide)=>currentSlide+1))// go to slide #5
馃殌 Feature Proposal
Allow for useSlider hook to specify an initial position and update the slide programatically.
Motivation
I'm building a lightbox with pinch to zoom and I want to use this library but need to open a photo at any position and also need to update the position programatically.
Example
The text was updated successfully, but these errors were encountered: