0.1.4 • Published 6 years ago

react-styled-slider v0.1.4

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

React Styled Slider

React Styled Slider is a react and styled component slider. It is fully configurable.

Build Status

Live Image

Features

  • Mostly configurable
  • Styled-Components
  • No external CSS required.
  • Server Side Rendering supported

Note: Server Side Rendering works well without the styled-components collectStyles function also. But for better user experience please use collectStyles function from styled-components

Installation

$ npm install --save react-styled-carousel

Running example in local

$ git clone github.com/itsMrAkhil/react-styled-carousel
$ npm start

It'll open localhost:9000 port, where you can see live demo.

Example

import React from 'react';
import ReactDOM from 'react-dom'
import Slider from 'react-styled-carousel';

const ExampleSlider = () => (
  <Slider>
    <h1>1</h1>
    <h1>2</h1>
    <h1>3</h1>
    <h1>4</h1>
  </Slider>
);

ReactDOM.render(<ExampleSlider />, document.getElementById('root'));

Configurable Props

PropsTypeDefault ValueDescription
showArrowsBooleantrueIf true then only Arrows of navigation will be shown
LeftArrowReact NodeDefaultCustomized left arrow button
infiniteBooleantrueInfinitely slide cards
RightArrowReact NodeDefaultCustomized right arrow button
showDotsBooleantrueShow navigation or pagination dots below the slider
DotReact NodeDefaultCustomized pagination button (Active slide Dot will get active as Boolean prop.)
childrenReact NodenullCards are components which you want to show in the carousel
cardsToShowNumberChildren lengthHow many cards to be shown for a single slide.
afterSlideFunctionnullThis function will be executed after every sliding is completed
beforeSlideFunctionnullThis function will be executed before starting every sliding

License

MIT (Free Software, Chill Yeah!)

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago