React Spring Carousel


Most of the properties/behaviors are shared between useSpringCarousel and useTransitionCarousel; I suggest to check the first one for a complete overview of the capabilities of the library.

Start using the carousel is simple!

  import { useTransitionCarousel } from 'react-spring-carousel'

  export function Component() {
    const { carouselFragment } = useTransitionCarousel({
      items: => ({
        renderItem: (
          <CarouselItem color={i.color}>

    return (

As you may see, the animation result is slightly different, since the hook that powers this version of the carousel works slightly different. For more information about how it works, you can check here.

Note: Unlike what happen with useSpringCarousel, the useTransitionCarousel hook makes use of react state, aka useState, to trigger the carousel navigation.