1.0.5-pre3 • Published 5 years ago

react-swiping-carousel v1.0.5-pre3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-swiping-carousel

A hackable carousel for react (mobile and desktop)

NPM JavaScript Style Guide

Install

npm install react-swiping-carousel

Usage

import React, { Component } from 'react'

import {CarouselComponent} from 'react-swiping-carousel'

class Example extends Component {
  render() {
    return (
		<CarouselComponent>
			<div>
				<p>You can insert any tag as child</p>
			</div>
			<p>Even a lonely p</p>
			<img src="" alt="Or an image" />
		</CarouselComponent>
	)
  }
}

The Carousel will expand 100% of its parent, then will calculate the space of each child and voilá magic

I'm currently working on detect windows resizes and/or element size rescaling for making the component fully responsive

Props

The Carousel have some flags which provide you some customization:

FlagNameValuesAction
align"left" || "center" || "right"This sets the alignment for the selected item
align{first: "left" || "center" || "right", last: "left" || "center" || "right", nth: "left" || "center" || "right"}This sets the alignment for the first element, the last and the selected item
lengthintegerThe number of items to use as swipeable
marginfloatThe space between items
scrollDistancefloatThe distance the user needs to swipe for changes to take effect

License

MIT © MIGUELez11

1.0.5-pre2

5 years ago

1.0.5-pre3

5 years ago

1.0.5-pre

5 years ago

1.0.4-e

5 years ago

1.0.3-f

5 years ago

1.0.4-d

5 years ago

1.0.3-e

5 years ago

1.0.3-g

5 years ago

1.0.4

5 years ago

1.0.4-c

5 years ago

1.0.4-b

5 years ago

1.0.3-d

5 years ago

1.0.3-c

5 years ago

1.0.3-b

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago