Skip to content

aashishshrestha5532/react-native-swipeable-carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 (local).

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.

About

A simple swipeable card carousel for react native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published