An open API service indexing awesome lists of open source software.

https://github.com/manishsinghtomar/card-slider_in_react


https://github.com/manishsinghtomar/card-slider_in_react

react-slick react-slick-carousel reactjs tailwindcss

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

          

# React Slick
React slick is a carousel component built with React. It is a react port of slick carousel.

```ls
npm install react-slick --save
```

# Include CSS
You can include css required for this library in 2 ways

Install the slick-carousel package and import css in to your slider component

### npm

```ls
npm install slick-carousel --save
```
```css
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
```

or you can add cdn link in your html

```css

```
```jsx
import React from "react";
import Slider from "react-slick";

export default function SimpleSlider() {
var settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
};
return (


1




2




3




4




5




6




);
}
```

## Step 1 - wrapping up cards code inside`` component.

## Step 2 - import react-slick libraries.

```jsx
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
```

```jsx
const settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 3,//how many slide you want show initially.
slidesToScroll: 1//on clicking on arrow button how many slide will scroll at a time
};
```