- Fix for
getNode()deprecation warning with RN0.62+(thanks @r0b0t3d)
- Fix for incorrect snapToItem (thanks @Romick2005 & @sergeyzhukov)
- Fix issue with tappable pagination dots (thanks @Creskendoll)
- Clear all timeouts when stopping autoplay (thanks @adrianocola)
- Add props
animatedDuration,animatedFriction,animatedTensionanddelayPressInDotto thePaginationcomponent (thanks @muhlenbrock)
- Remove TypeScript definitions since they were causing issues (thanks @radko93)
- If you're using Typescript you should install the type definitions this way:
npm install --save @types/react-native-snap-carousel
- If you're using Typescript you should install the type definitions this way:
- Seems like it's time to remove the
getItemLayout&initialScrollIndexoverride to properly display the first item when its index is a huge number (thanks @rontalx)⚠️ Make sure to read how these props work together (link#1 & link #2), and to understand why they were disabled in the first place!
- Fix
snapToItemnot working whenenableMomentumis set totrueon Android (thanks @daaashleywch) - Add basic TypeScript support (thanks @facuacostag)
- Stack layout's peaking items will remain opaque if
inactiveSlideOpacityis set to1
- Fix autoplay stop after user interaction (thanks @HelloCore)
- Allow using a custom animated image component with
ParallaxImage(thanks @DanielMarkiel)
- Migrate from deprecated
componentWillReceivePropstocomponentDidUpdate(thanks @kiarashws) - Use
console.errorinstead ofconsole.warnfor critical warnings (thanks @bardiarastin) - Update parallax doc (thanks @bardiarastin)
- Set
removeClippedSubviewstofalseby default for 'tinder' and 'stack' layouts, or whenuseScrollViewis set totrue. This aims at preventing a bunch of rendering issues. - Make sure that autoplay is properly restarted after a
touchStartevent - Allow serialized animated event as
onScroll. See #439 for more info (thanks @Jberivera) - Allow using a custom scroll component. See #498 for more info (thanks @martinezguillaume)
- Prevent loop animation from being played when reaching the end of the dataset. See #443 for more info (thanks @suhanmoon)
- Fire the
onTouchStartprop. See #464 for more info (thanks @sangle7) - Add accessibilityLabel to
Pagination. See #438 for more info (thanks @thymikee) - Allow
contentContainerCustomStyleto override default paddings. See #482 for more info (thanks @yamov)
- Fix issue with
scrollEnabledintroduced in version3.7.3... again! (thanks @ifsnow)
- Fix issue with
scrollEnabledintroduced in version3.7.3(thanks @JakeRawr)
- Fix faulty animated value and make sure to always check for
databefore checking fordata.length - Fix
scrollEnabledoverride when it was initially set tofalse(thanks @JakeRawr)
- Fix
ParallaxImagenot being rendered (thanks @louiszawadzki)
- Fix a potential crash in release mode (thanks @hanpanpan200)
- Do not round scroll offset's number in order to prevent potential issues with scroll repositioning
- Add a new callback method:
onBeforeSnapToItem() - Add prop
lockScrollTimeoutDuration - Add the ability to enable/disable callback's execution when snaping programmatically
- Add the ability to change
scrollEnabledtotruefrom initiallyfalse(thanks @tomauty)
- Fix random errors when accessing wrapped component's reference
- Fix errors triggered when calling
setState()while the component has already been unmounted
- Support
keyExtractoronScrollView(thanks @hadimhd)
- Add a
layoutprop to let users choose between 3 different carousel layouts (see the documentation) - Add the ability to define dynamic styles based on scroll position with props
scrollInterpolatorandslideInterpolatedStyle. This allows implementing custom animations and layouts (see the dedicated documentation). - Rename props
customAnimationTypeandcustomAnimationOptionstoactiveAnimationTypeandactiveAnimationOptions
- Add the ability to render either a
ScrollViewcomponent or aFlatListone (default) (see propuseScrollView) - Add support for versions of React Native <
0.43(see this note) - Add support for custom animations (see props
customAnimationTypeandcustomAnimationOptions) - Add method
triggerRenderingHack()to work around a randomFlatListbug that keeps content hidden until the carousel is scrolled - Hack around
ScrollView/FlatListimage rendering issues on Android - Fix issue with tappable dots when loop is enabled
- Fix
snapToItemcall that results in snapping to the wrong item whenloopis enabled - Fix issue that, in some use cases, prevents every items but the initial ones to be rendered
- On Android, prevent loop and callback issues because scroll offset's value doesn't return an integer
- Add prop
inactiveSlideShift(see #204) - Expose
FlatList's propinverted(use at your own risk since it will mess with the current handling of RTL layouts) - Set
removeClippedSubviewstotrueby default
- Fix issue with possible faulty index when
loopClonesPerSideis greater than data length - Guard against
setNativeProps()beingundefined - On Android, make sure that the first item has the proper active style after init
- On iOS, remove the feature "snap as soon as the previous/next item becomes active when
lockScrollWhileSnappingis enabled" since it messes with direct calls tosnapToItem()
- Prevent issue on iOS when
enableSnapis set tofalsewhilelockScrollWhileSnappingis set totrue
- Fix issue with
lockScrollWhileSnappingwhen no callback was provided Paginationcomponent: add propsactiveOpacityanddotContainerStyle
- Fix issue when initializing the carousel with empty data
- Make tappable
PaginationDotsnaps to the right item when loop is enabled
- Bring in the most wanted 'infinite loop' feature 🎉 (see the 'Loop' section for more info about the new props
loopandloopClonesPerSide) - Improve Android behavior when momentum is disabled
- Guard against potential errors when component is unmounted
- Add prop
lockScrollWhileSnappingto improve behavior when momentum is disabled
- Fix issue with callback not fired when doing a long swipe
- Fix RTL issues
- Fix issue with active item when
enableMomentumwas set totrue - Fix issue with overlapping items (thanks @henninghall)
ParallaxImagecomponent: allow overriding default stylesPaginationcomponent: adapt to RTL layouts
- Fix issue with active item when no callback has been specified (introduced in version
3.2.0)
- Refactor callback handling. Make sure to use the new prop
callbackOffsetMarginif you experience missed callbacks. - Make item's scale and opacity animations follow scroll value (thanks @hammadj)
Paginationcomponent: make dots tappable with new propstappableDotsandcarouselRef(see the example)- Fix issue when carousel has been unmounted but parent container requires to re-render
- Fix state and scroll issues when the currently active item is being dynamically removed
- Improve snap feeling when momentum is disabled (default)
- Add prop
callbackOffsetMargin - Remove props
animationFunc,animationOptions,scrollEndDragDebounceValue,snapOnAndroid, anduseNativeOnScroll
Paginationcomponent: add new props for advanced customization
- Do not use this version as some temporary code was pushed to
npmby mistake. Make sure to use version3.1.0instead.
- Plugin is now built on top of
FlatList, which allows for huge performance optimizations. From now on, items must be rendered using propsdataandrenderItem.
- Add
ParallaxImagecomponent (see the specific documentation here) - Add prop
activeSlideAlignment - Fix issue with autoplay when setting
scrollEnabledtofalse - Prevent going back to the first item when overscrolling the last one
- Prevent callback from being called at the wrong time in some specific scenarios
- Add
Paginationcomponent (see the specific documentation here) - Allow
firstItemto be changed dynamically - Allow
0value forcarouselHorizontalPaddingandcarouselVerticalPadding(thanks @bonbonez) - Keep the easing of slide's opacity animation linear
- Use native driver for slide's animation (can be overridden via
animationOptions)
- Fix issue when snap is disabled
- Refactor callback handling to provide a more reliable solution when momentum is disabled
- Fix issue with parallel animations (thanks @jnbt)
- Prevent calls to
undefinedinterpolators when working with dynamic slides (thanks @cskaynar) - Improve vertical mode
- Add prop
scrollEndDragDebounceValue - Expose current scroll position with
this.currentScrollPosition - Remove props
scrollEndDragThrottleValueandsnapCallbackDebounceValue(usescrollEndDragDebounceValueinstead)
- Fix issue that prevented inactive styles of first and last items to be applied when using
snapToPrevandsnapToNextmethods
- Do not mark
sliderWidthandsliderHeightas required - Add warnings when properties specific to carousel's orientation haven't been set
- Implement vertical mode (prop
vertical) - Make sure that current active item is properly updated when snapping
- Prevent issues when 'sliderWidth' is smaller than viewport's width
- Recalculate card positions on layout to handle rotation (thanks @andrewpope); make sure to read this note
- Refresh card positions if slider and/or item's dimensions are updated (thanks @hoangnm)
- Add props
scrollEndDragThrottleValueandsnapCallbackDebounceValue - Expose
View'sonLayoutprop - Deprecate prop
onScrollViewScroll
- Add prop
onScrollViewScroll
- Default value for
showsHorizontalScrollIndicatoris nowfalse - Expose
ScrollView'sonSscrollprop (thanks @radko93)
- Do not trigger
onSnapToItemwhen snapping back to the same slide (thanks @rgabs) - Add prop
carouselHorizontalPaddingto override container's inner padding (thanks @skeie)
- Ensure compatibility with RN 0.43 (previous version of plugin's dependency
react-addons-shallow-comparewas breaking with React 16) - Fix issue with padding on iOS that could cause the carousel to snap back when its last item was clicked
- Add RTL support
- Keep current active item when adding slides dynamically
- Prevent invalid
firstItemnumber - Add prop
activeSlideOffset
- Prevent error when carousel has only one child (thanks @kevinvandijk)
- Fix issue when appending dynamic slides (the first one was ignored)
- Fix edge case that prevented the first slide from being focused when swiping back with momentum enabled
- Bump example's RN version to 0.42.3
- Make sure that scroll indicator is hidden by default
- Fix un-handled exception with interpolators (thanks @chitezh)
- Items are now direct children of the
<Carousel />component, which makes it easier to use (thanks @Jonarod) - Props
itemsandrenderItemhave been removed
- Due to some touch events being buggy, rework methods so the children will receive touch events on Android
- Add prop
enableMomentum - Fix an infinite-loop on iOS with momentum enabled
- Fix the snapping effect when releasing touch without interia on iOS with momentum enabled
- Fix autoplay on Android, it should start and stop properly and stop being triggered while swiping
- Use
View.propTypes.styleinstead ofPropTypes.numberin styles validation (thanks @pesakitan22)
- Items length can now be changed on-the-fly (thanks @superical)
- Now handling momentum (thanks @FakeYou)
- Better update strategy with shallowCompare
- Add
snapToNext(),snapToPrev(),currentIndexmethods and properties
- Properly center on first item when mounting component on Android (potentially iOS too)
- Pass the item data as the 2nd param of
onSnapToItemcallback
- Fix reference call when the component has been unmounted
- Add prop
onSnapToItem
- Center slides properly
- Handle one slide only
- Add props
inactiveSlideScale,inactiveSlideOpacity,containerCustomStyleandcontentContainerCustomStyle


