Dosu LogoDosu Logo
Ask
Join our Discord
Organization avatar
react-native-reanimated-carouselPublic
Caspian's Workspace
Documentsreact-native-reanimated-carousel
Props
Props
Type
Document
Status
Published
Created
Apr 22, 2026
Updated
Aug 4, 2026
Updated by
Dosu Bot

Props#


import { Callout } from 'nextra/components'

Basic#

This page documents the v5 beta API. The exported TypeScript types remain the source of truth for exact signatures.

data#

Carousel items data set

typedefaultrequired
T[]-βœ…

renderItem#

Render carousel item

typedefaultrequired
info:item:T,index:number,animationValue:SharedValue\<numberβ€…info: { item: T, index: number, animationValue: SharedValue\<number\> }info:item:T,index:number,animationValue:SharedValue\<number => React.ReactElement-βœ…

defaultScrollOffsetValue#

@deprecated Use scrollOffsetValue instead.

Legacy name for the carousel scroll offset shared value. If provided, the carousel will mutate it during gestures/animations.

typedefaultrequired
SharedValue<number>-❌

scrollOffsetValue#

The carousel scroll offset shared value (recommended). If provided, the carousel will mutate it during gestures/animations.

typedefaultrequired
SharedValue<number>-❌

autoFillData#

Auto fill data array to allow loop playback when the loop props is true.[1] \=\> [1, 1, 1]οΌ›[1, 2] \=\> [1, 2, 1, 2]

typedefaultrequired
booleantrue❌

vertical#

Layout items vertically instead of horizontally

typedefaultrequired
booleanfalse❌

width#

@deprecated Use style prop instead. e.g. style={{ width: 300 }}

Specified carousel container width (legacy v4 API)

typedefaultrequired
number | undefined-❌

height#

@deprecated Use style prop instead. e.g. style={{ height: 200 }}

Specified carousel container height (legacy v4 API)

typedefaultrequired
number | undefined-❌

mode#

Carousel Animated transitions

typedefaultrequired
'horizontal-stack' | 'vertical-stack' | 'parallax'undefined (normal layout)❌

modeConfig#

Mode-specific animation configuration. See the Parallax Mode and Stack Mode sections below.

typedefaultrequired
object{}❌

style#

Style of the carousel container (recommended for sizing).

If style.width / style.height are not provided, the carousel will fall back to automatic measurement via layout β€” but the parent layout must still constrain the size (e.g. flex: 1, or a fixed size wrapper).

typedefaultrequired
StyleProp<ViewStyle>{}❌

itemWidth#

Horizontal page size used for snapping and animations.

This is not the same as the container width. Use this when you want multiple items visible within a single viewport.

typedefaultrequired
number | undefinedcontainer width❌

itemHeight#

Vertical page size used for snapping and animations.

This is not the same as the container height. Use this when you want multiple rows visible at once in vertical mode.

typedefaultrequired
number | undefinedcontainer height❌

contentContainerStyle#

Style of the carousel content container.

typedefaultrequired
StyleProp<ViewStyle>{}❌

defaultIndex#

Default index

typedefaultrequired
number0❌

autoPlay#

Auto play

typedefaultrequired
booleanfalse❌

autoPlayReverse#

Auto play reverse playback

typedefaultrequired
booleanfalse❌

autoPlayInterval#

Auto play playback interval

typedefaultrequired
number1000❌

scrollAnimationDuration#

Time a scroll animation takes to finish

typedefaultrequired
number500❌

loop#

Carousel loop playback

typedefaultrequired
booleantrue❌

testID#

Used to locate this view in end-to-end tests

typedefaultrequired
string-❌

onSnapToItem#

Callback fired when navigating to an item

typedefaultrequired
index:numberindex: numberindex:number => void-❌

onScrollStart#

Callback fired when scroll start

typedefaultrequired
=> void-❌

onScrollEnd#

Callback fired when scroll end

typedefaultrequired
index:numberindex: numberindex:number => void-❌

withAnimation#

Specifies the scrolling animation effect.

If provided, it takes precedence over scrollAnimationDuration.

typedefaultrequired
{type: 'spring';config: WithSpringConfig;} | {type: 'timing';config: WithTimingConfig;}-❌

onConfigurePanGesture#

PanGesture config

typedefaultrequired
onConfigurePanGesture?: panGesture:CarouselPanGesturepanGesture: CarouselPanGesturepanGesture:CarouselPanGesture => void-❌

windowSize#

The maximum number of items that can respond to pan gesture events, 0 means all items will respond to pan gesture events

typedefaultrequired
number0❌

onProgressChange#

This callback is called when the carousel is scrolled. If you want to update a shared value automatically, you can use the shared value as a parameter directly.
The callback provides two parameters: offsetProgress of offset distance 0390780...0 390 780 ...0390780...; absoluteProgress to index 012...0 1 2 ...012...

typedefaultrequired
\(offsetProgress: number, absoluteProgress: number => void) | SharedValue<number>-❌

onLayout#

Called when the carousel content container is laid out.

typedefaultrequired
event:LayoutChangeEventevent: LayoutChangeEventevent:LayoutChangeEvent => void-❌

pagingEnabled#

When true, the scroll view stops on multiples of the scroll view's size when scrolling

typedefaultrequired
booleantrue❌

overscrollEnabled#

If enabled, the item will scroll to the first placement when scrolling past the edge rather than closing to the last. (previous conditions: loop=false)

typedefaultrequired
booleantrue❌

snapEnabled#

If enabled, releasing the touch will scroll to the nearest item, valid when pagingEnabled=false

typedefaultrequired
booleantrue❌

enableSnap#

@deprecated Use snapEnabled instead.

Legacy name for snapEnabled.

typedefaultrequired
boolean-❌

enabled#

when false, Carousel will not respond to any gestures

typedefaultrequired
booleantrue❌

fixedDirection#

If positive, the carousel will scroll to the positive direction and vice versa.

typedefaultrequired
'positive' | 'negative'-❌

customConfig#

Custom carousel config

typedefaultrequired
{type?: 'negative' | 'positive';viewCount?: number;} | => {type?: 'negative' | 'positive';viewCount?: number;}-❌

customAnimation#

Custom worklet animation. See Custom Animations.

typedefaultrequired
value:number,index:numbervalue: number, index: numbervalue:number,index:number => ViewStyle-❌

maxScrollDistancePerSwipe#

Maximum offset value for one scroll. Carousel cannot scroll over than this value.

typedefaultrequired
number-❌

minScrollDistancePerSwipe#

Minimum offset value for once scroll. If the translation value is less than this value, the carousel will not scroll.

typedefaultrequired
number-❌

Parallax Mode#

<Carousel
    {...restProps}
    mode="parallax"
    modeConfig={{
        parallaxScrollingScale: 0.9,
        parallaxScrollingOffset: 50,
        parallaxAdjacentItemScale: 0.8,
    }}
/>

parallaxScrollingOffset#

control prev/next item offset

typedefaultrequired
number100❌

parallaxScrollingScale#

control prev/current/next item scale

typedefaultrequired
number0.8❌

parallaxAdjacentItemScale#

control prev/next item scale

typedefaultrequired
numberparallaxScrollingScale ** 2❌

Stack Mode#

<Carousel
    {...restProps}
    mode="horizontal-stack"
    modeConfig={{
        moveSize: 200,
        stackInterval: 30,
        scaleInterval: 0.08,
        rotateZDeg: 135,
        snapDirection: 'left',
    }}
/>

showLength#

Maximum number of cards shown in the stack. By default, the stack can show the remaining data length.

typedefaultrequired
numberdata length - 1❌

stackInterval#

The spacing of each item

typedefaultrequired
number18❌

moveSize#

Item translate size

typedefaultrequired
numberscreen.width❌

scaleInterval#

The scale of each item

typedefaultrequired
number0.04❌

opacityInterval#

The opacity of each item

typedefaultrequired
number0.1❌

rotateZDeg#

The item rotation Angle

typedefaultrequired
number30❌

snapDirection#

Slide direction

typedefaultrequired
'left'|'right''left'❌

Ref#

By using these methods, remember you need to reference the component using React useRef().

JavaScript

const ref = React.useRef(null)

If you're using TypeScript:

You need to import:

import type { ICarouselInstance } from "react-native-reanimated-carousel";

and then:

const ref = React.useRef<ICarouselInstance>(null);

Now, you only need to pass the ref to the Carousel component:

<Carousel ref={ref} (...) />;

And now you can use these methods throughout your component. Here's an example of implementing a button to go to the next slide:

import React from "react";
import Carousel from "react-native-reanimated-carousel";
import type { ICarouselInstance } from "react-native-reanimated-carousel";
import { Button, Text, View } from "react-native";

// 1. Create a data array with the slides
const data = [
  {
    title: "Slide 1",
    content: "Slide 1 Content",
  },
  {
    title: "Slide 2",
    content: "Slide 2 Content",
  },
  {
    title: "Slide 3",
    content: "Slide 3 Content",
  },
];

const Example = () => {
  const ref = React.useRef<ICarouselInstance>(null); // 2. Create a ref for the Carousel component

  return (
    <View>
      {/* 3. Add the Carousel component with the ref */}
      <Carousel
        ref={ref}
        data={data}
        style={{ width: 300, height: 200 }} // 4. Provide size via the style prop
        renderItem={({ item }) => (
          <View>
            <Text>{item.title}</Text>
            <Text>{item.content}</Text>
          </View>
        )}
      />
      {/* 5. Add a button to trigger the next slide */}
      <Button
        title="Next"
        onPress={() => {
          ref.current?.next(); // 6. Call the "next" method on the ref
        }}
      />
    </View>
  );
};

export default Example;

prev#

Scroll to previous item, it takes one optional argument countcountcount, which allows you to specify how many items to cross

type
options?: { count?: number, animated?: boolean, onFinished?: \( => void }) => void

next#

Scroll to next item, it takes one optional argument countcountcount, which allows you to specify how many items to cross

type
options?: { count?: number, animated?: boolean, onFinished?: \( => void }) => void

scrollTo#

scrollTo({ count: -2 })

Use count to scroll to a position where relative to the current position, scrollTocount:βˆ’2{count:-2}count:βˆ’2 is equivalent to prev222, scrollTocount:2{count:2}count:2 is equivalent to next222. And also can jump to specific position.

type
options?: { index?: number, count?: number, animated?: boolean, onFinished\?: \( => void }) => void

getCurrentIndex#

Get the current item index. Call this from an event handler or effect, not while React is rendering.

type
=>number
Documents
Expo SDK Compatibility
Getting Started
Migration Guide to v5.x
React Native Reanimated
Custom Animations
Examples / basic-layouts / Normal
Examples / utils / Pagination
FAQ
How it works?
Migration Guide to v5.x
Usage
Virtual List Rendering
Compare
Examples / Summary
Examples / basic-layouts / Left Align
Examples / basic-layouts / Parallax
Examples / basic-layouts / Stack
Examples / custom-animations / Advanced Parallax
Examples / custom-animations / Anim Tab Bar
Examples / custom-animations / Blur Parallax
Examples / custom-animations / Blur Rotate
Examples / custom-animations / Circular
Examples / custom-animations / Cube 3d
Examples / custom-animations / Curve
Examples / custom-animations / Flow
Examples / custom-animations / Fold
Examples / custom-animations / Multiple
Examples / custom-animations / Press Swipe
Examples / custom-animations / Quick Swipe
Examples / custom-animations / Rotate Fade In Out
Examples / custom-animations / Rotate In Out
Examples / custom-animations / Scale Fade In Out
Examples / custom-animations / Tinder
Migration Guide to v4.x
Programmatic Control
Props