amartya324 / Slider

slider made in ReactJs. React slick library is used.

Home Page:https://slider-react-slick.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image

Main Logic

To move the slides back and forth, use the transform property with a translateX value. For example, to move the slides to the left, you can use the transform:translateX(-100%) property however to move the slides to the right, you can use the transform:translateX(100%) property. For the active slide we will use transform:translateX(0)

Current Person

Create a currentPerson state value in App.jsx and set it to 0 initially. This will allow you to keep track of the current slide being displayed.

Prev and Next

Implemented the prev and next functionality using the setCurrentPerson function to update the currentPerson state value.

Auto Slide

Implement the auto slide functionality using the setInterval function to change the currentPerson state value at regular intervals.

React Slick Library

React Slick Docs

About

slider made in ReactJs. React slick library is used.

https://slider-react-slick.netlify.app/


Languages

Language:JavaScript 54.4%Language:CSS 43.2%Language:HTML 2.4%