- Add a
layout
prop 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
scrollInterpolator
andslideInterpolatedStyle
. This allows implementing custom animations and layouts (see the dedicated documentation). - Rename props
customAnimationType
andcustomAnimationOptions
toactiveAnimationType
andactiveAnimationOptions
- Add the ability to render either a
ScrollView
component or aFlatList
one (default) (see propuseScrollView
) - Add support for versions of React Native <
0.43
(see this note) - Add support for custom animations (see props
customAnimationType
andcustomAnimationOptions
) - Add method
triggerRenderingHack()
to work around a randomFlatList
bug that keeps content hidden until the carousel is scrolled - Hack around
ScrollView
/FlatList
image rendering issues on Android - Fix issue with tappable dots when loop is enabled
- Fix
snapToItem
call that results in snapping to the wrong item whenloop
is 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
removeClippedSubviews
totrue
by default
- Fix issue with possible faulty index when
loopClonesPerSide
is 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
lockScrollWhileSnapping
is enabled" since it messes with direct calls tosnapToItem()
- Prevent issue on iOS when
enableSnap
is set tofalse
whilelockScrollWhileSnapping
is set totrue
- Fix issue with
lockScrollWhileSnapping
when no callback was provided Pagination
component: add propsactiveOpacity
anddotContainerStyle
- Fix issue when initializing the carousel with empty data
- Make tappable
PaginationDot
snaps 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
loop
andloopClonesPerSide
) - Improve Android behavior when momentum is disabled
- Guard against potential errors when component is unmounted
- Add prop
lockScrollWhileSnapping
to 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
enableMomentum
was set totrue
- Fix issue with overlapping items (thanks @henninghall)
ParallaxImage
component: allow overriding default stylesPagination
component: 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
callbackOffsetMargin
if you experience missed callbacks. - Make item's scale and opacity animations follow scroll value (thanks @hammadj)
Pagination
component: make dots tappable with new propstappableDots
andcarouselRef
(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
Pagination
component: add new props for advanced customization
- Do not use this version as some temporary code was pushed to
npm
by mistake. Make sure to use version3.1.0
instead.
- Plugin is now built on top of
FlatList
, which allows for huge performance optimizations. From now on, items must be rendered using propsdata
andrenderItem
.
- Add
ParallaxImage
component (see the specific documentation here) - Add prop
activeSlideAlignment
- Fix issue with autoplay when setting
scrollEnabled
tofalse
- 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
Pagination
component (see the specific documentation here) - Allow
firstItem
to be changed dynamically - Allow
0
value forcarouselHorizontalPadding
andcarouselVerticalPadding
(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
undefined
interpolators when working with dynamic slides (thanks @cskaynar) - Improve vertical mode
- Add prop
scrollEndDragDebounceValue
- Expose current scroll position with
this.currentScrollPosition
- Remove props
scrollEndDragThrottleValue
andsnapCallbackDebounceValue
(usescrollEndDragDebounceValue
instead)
- Fix issue that prevented inactive styles of first and last items to be applied when using
snapToPrev
andsnapToNext
methods
- Do not mark
sliderWidth
andsliderHeight
as 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
scrollEndDragThrottleValue
andsnapCallbackDebounceValue
- Expose
View
'sonLayout
prop - Deprecate prop
onScrollViewScroll
- Add prop
onScrollViewScroll
- Default value for
showsHorizontalScrollIndicator
is nowfalse
- Expose
ScrollView
'sonSscroll
prop (thanks @radko93)
- Do not trigger
onSnapToItem
when snapping back to the same slide (thanks @rgabs) - Add prop
carouselHorizontalPadding
to override container's inner padding (thanks @skeie)
- Ensure compatibility with RN 0.43 (previous version of plugin's dependency
react-addons-shallow-compare
was 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
firstItem
number - 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
items
andrenderItem
have 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.style
instead ofPropTypes.number
in 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()
,currentIndex
methods and properties
- Properly center on first item when mounting component on Android (potentially iOS too)
- Pass the item data as the 2nd param of
onSnapToItem
callback
- Fix reference call when the component has been unmounted
- Add prop
onSnapToItem
- Center slides properly
- Handle one slide only
- Add props
inactiveSlideScale
,inactiveSlideOpacity
,containerCustomStyle
andcontentContainerCustomStyle