FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
3.08k stars 595 forks source link

Are imperative api's such as `slideNext` and `slidePrev` available outside `Carousel` component? #1029

Closed samuelkarani closed 8 months ago

samuelkarani commented 1 year ago

Question

Describe the Problem

Are imperative api's such as slideNext and slidePrev available? Maybe via something like a hook or class instance. How can one navigate outside the Carousel component? I cant seem to find this in the docs or issues panel.

Example one such availability:

const { slideNext, slidePrevious } = useSlider();

ssolders commented 1 year ago

Would love this feature too! Or just if the functions could be imported

import { goToSlide } from 'nuka-carousel' 
henrybabbage commented 1 year ago

I would also like to know if this is possible

carbonrobot commented 8 months ago

These are now available in Nukav8