react-native-swipeable-carousel
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

React Native Swipeable Carousel

contributions welcome npm version npm downloads

A simple swipeable carousel created on the top of react-native-pager-view

Preview

demo gif

Get started

Pre-requisites

Since this package is created on the top of react native pager view and other libraries. So first you need to install them.

  yarn add react-native-size-matters react-native-pager-view react-native-svg

Installation

  yarn add react-native-swipeable-carousel

Usage

import Carousel from 'react-native-swipeable-carousel';

// imagePath can get images URL or imported images.

const data = [
    "https://cdn.pixabay.com/photo/2017/12/09/16/41/snow-man-3008179_1280.jpg",
      "https://cdn.pixabay.com/photo/2017/12/09/16/42/snow-man-3008179_1280.jpg"
];

<Carousel
  images={data}
  enableGestureSwipe={true}
/>

Properties

Prop Description Default Required
images An array of images (urls or local). None Yes
height Carousel height. 200 No
width Carousel width. 400 No
enableGestureSwipe Enable gesture swipe(left/right). false No

Peer dependencies

  1. react-native-pager-view
  2. react-native-size-matters
  3. react-native-svg

License

This project is licenced under the MIT License.

Package Sidebar

Install

npm i react-native-swipeable-carousel

Weekly Downloads

5

Version

1.0.7

License

MIT

Unpacked Size

19.5 kB

Total Files

16

Last publish

Collaborators

  • elton_aasis
  • riteshchaudhari