package
Slider/Carousel powered by React Motion.
npm install react-motion-sliderGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 11 packages.
121.8 kB
Includes dependencies.
currentKey: PropTypes.anyMove to a slide by its key.
currentIndex: PropTypes.numberMove to a slide by its index.
slidesToShow: PropTypes.numberThe amount of slides shown in view. Defaults to 1.
slidesToMove: PropTypes.numberThe amount of slides to move upon using prev and next methods. Defaults to 1.
autoHeight: PropTypes.boolAnimates the wrapper height to fit the current slide. Defaults to false.
align: PropTypes.oneOf(['left', 'center', 'right'])Offsets the slide to align either left (default), center, or right.
swipe: PropTypes.oneOf([true, false, 'touch', 'mouse'])Enable touch and/or mouse dragging. Defaults to true.
swipeThreshold: PropTypes.numberThe amount the user must swipe to advance slides. (sliderWidth * swipeThreshold). Defaults to 0.5
flickTimeout: PropTypes.numberThe amount of time in milliseconds that determines if a swipe was a flick or not.
springConfig: React.PropTypes.objectOf(React.PropTypes.number)Accepts a React Motion spring config.
beforeSlide: PropTypes.func(currentIndex, nextIndex)Prop callback fired before slide change.
afterSlide: PropTypes.fun(currentIndex)Prop callback fired after slide change.
prevMoves to the previous slide.
nextAdvances to the next slide.
clone repo
git clone git@github.com:souporserious/react-motion-slider.git
move into folder
cd ~/react-motion-slider
install dependencies
npm install
run dev mode
npm run dev
open your browser and visit: http://localhost:8080/
^1.0.6
1.0.7
^0.4.3
0.5.2