Skip to content

Commit eab438f

Browse files
authored
Merge pull request #5 from ItsMrAkhil/readme.md
Readme.md and LICENSE files.
2 parents 516ce97 + c369da4 commit eab438f

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Akhil Pentamsetti
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# React Styled Slider
2+
**React Styled Slider** is a react and styled component slider. It is fully configurable.
3+
4+
[![Build Status](https://travis-ci.org/ItsMrAkhil/react-styled-carousel.svg?branch=master)](https://travis-ci.org/ItsMrAkhil/react-styled-carousel)
5+
6+
![Live Image](https://res.cloudinary.com/dzfragjmc/image/upload/v1519651815/ezgif-5-efffafcdbd_skf8yd.gif)
7+
8+
#### Features
9+
- Mostly configurable
10+
- Styled-Components
11+
- No external CSS required.
12+
- Server Side Rendering supported
13+
14+
> **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**
15+
16+
#### Installation
17+
```sh
18+
$ npm install --save react-styled-carousel
19+
```
20+
21+
#### Running example in local
22+
```sh
23+
$ git clone github.com/itsMrAkhil/react-styled-carousel
24+
$ npm start
25+
```
26+
It'll open localhost:9000 port, where you can see live demo.
27+
28+
#### Example
29+
```js
30+
import React from 'react';
31+
import ReactDOM from 'react-dom'
32+
import Slider from 'react-styled-carousel';
33+
34+
const ExampleSlider = () => (
35+
<Slider>
36+
<h1>1</h1>
37+
<h1>2</h1>
38+
<h1>3</h1>
39+
<h1>4</h1>
40+
</Slider>
41+
);
42+
43+
ReactDOM.render(<ExampleSlider />, document.getElementById('root'));
44+
```
45+
46+
#### Configurable Props
47+
Props | Type | Default Value | Description
48+
----- | ---- | ------------- | -----------
49+
`showArrows` | `Boolean` | `true` | If `true` then only Arrows of navigation will be shown
50+
`LeftArrow` | `React Node` | Default | Customized left arrow button
51+
`RightArrow` | `React Node` | Default | Customized right arrow button
52+
`showDots` | `Boolean` | `true` | Show navigation or pagination dots below the slider
53+
`Dot` | `React Node` | Default | Customized pagination button (`Active slide Dot` will get `active` as `Boolean` prop.)
54+
`children` | `React Node` | null | Cards are components which you want to show in the carousel
55+
`cardsToShow` | `Number` | Children length | How many cards to be shown for a single slide.
56+
`afterSlide` | `Function` | null | This function will be executed after every sliding is completed
57+
`beforeSlide` | `Function` | null | This function will be executed before starting every sliding
58+
59+
License
60+
----
61+
MIT (**Free Software, Chill Yeah!**)

0 commit comments

Comments
 (0)