Giter Club home page Giter Club logo

react-image-carousel's Introduction

react-image-carousel

npm version Download Count

demo gif

React image carousel is a React component for building image galleries and carousels

  • Thumbnail navigation configurable
  • Fade In/Fade Out
  • Autoplay configurable
  • Loop configurable
  • Prev/Next image

Live Demo

Live demo: https://grace951.github.io/react-image-carousel/

Example

Need more example? See examples

import { render } from 'react-dom';
import React from 'react';
import Carousel from 'react-image-carousel';

let images = [
	'/img/landing1.jpg',
	'/img/landing2.jpg',
	'/img/landing3.jpg',
	'/img/landing4.jpg',
	'/img/landing5.jpg'
];

render(<div className="my-carousel">
			<Carousel images={images} 
						thumb={true}
						loop={true}
						autoplay={3000}/>
		</div>, document.getElementById("app"))
		

Props

  • thumb: Boolean, default true
    • thumbnail navigation
  • loop: Boolean, default true
    • infinite sliding
  • image: Array, default []
    • source of images to show
  • autoplay: Number, default 3000
    • add this prop to enable autoplay, the value is set to slide interval

Notes

  • Feel free to contribute and or provide feedback!

Build the example locally

git clone https://github.com/Grace951/react-image-carousel.git
cd example/example2
npm install
npm start

Then open localhost:3000 in a browser.

License

MIT

react-image-carousel's People

Contributors

grace951 avatar

Watchers

James Cloos avatar PraveenKumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.