Skip to main content

Sync Control

Synchronous control navigation items, currently

import BearCarousel from "bear-react-carousel";

const SyncCarousel = () => {
const syncCarouselRefA = React.useRef<BearCarousel>(null);
const syncCarouselRefB = React.useRef<BearCarousel>(null);

return <div>
<BearCarousel
// ...ignore some
ref={syncCarouselRefA}
syncCarouselRefs={[syncCarouselRefB]}
/>
<BearCarousel
// ...ignore some
ref={syncCarouselRefB}
syncCarouselRefs={[syncCarouselRefA]}
/>
</div>
}

Try slide item A or B