ItalyEmiliano-Bucci/react-spring-carousel
A new Carousel experience for the web.
react-spring-carousel
A performant React carousel component powered by
react-springand@use-gesture.
Install
// npm v7.x
npm install --save react-spring-carousel
// npm v6.x or less
npm install --save react-spring react-spring-carousel
yarn add react-spring react-spring-carousel
Usage
import { useSpringCarousel } from 'react-spring-carousel'
const { carouselFragment, slideToPrevItem, slideToNextItem } = useSpringCarousel({
items: [
{
id: 'item-1',
renderItem: <div>Item 1</div>,
},
{
id: 'item-2',
renderItem: <div>Item 2</div>,
},
],
})
return (
<div>
<button onClick={slideToPrevItem}>Prev item</button>
<div>{carouselFragment}</div>
<button onClick={slideToNextItem}>Next item</button>
</div>
)
Official documentation
For a complete overview of the library, please visit the official documentation.
Similar Projects
Discover other similar projects and AI models.
Most modern mobile touch slider with hardware accelerated transitions
A lightweight carousel library with fluid motion and great swipe precision.
A performant, lightweight React slider/carousel for media and content transitions, featuring 60fps animations, modular styling, optional HOCs, and fullpage navigation utilities. 🖥️📱
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.