https://github.com/anmolsukki/next-owl-carousel
https://github.com/anmolsukki/next-owl-carousel
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anmolsukki/next-owl-carousel
- Owner: anmolsukki
- Created: 2024-02-17T19:55:17.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-30T06:30:01.000Z (7 months ago)
- Last Synced: 2024-11-25T07:02:36.577Z (5 months ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Next Owl Carousel
#### 1.Installation
```script
npm install --save next-owl-carousel
``````html
```
```jsx
import { useRef } from 'react';
import OwlCarousel from 'next-owl-carousel';
```### 2.Usage
```jsx
const carouselRef = useRef(null);
``````jsx
const options = {
loop: true,
responsiveClass: true,
dots: false,
autoplay: true,
responsive: {
0: { items: 1, dots: true },
768: { items: 2 },
},
};
``````jsx
const events = {
onDragged: function (event) {
console.log('====onDragged===>>', event);
},
onChanged: function (event) {
console.log('====onChanged===>>', event);
},
};
``````jsx
```
### 3. Methods
Previous
```jsx
carouselRef?.current?.prev()}>prev
```Next
```jsx
carouselRef?.current?.next()}>prev
```goTo(page)
```jsx
carouselRef?.current?.goTo(0)}>prev
```#### Reference https://www.npmjs.com/package/react-owl-carousel2
---
### Hi there, I'm [Anmol](https://www.linkedin.com/in/anmolsukki/) 👋
[](https://codesandbox.io/u/anmolsukki)Â Â Â
[](https://discord.gg/zMkSphwHjE)Â Â Â
[](https://www.linkedin.com/in/anmolsukki/)Â Â Â
[](https://www.facebook.com/Anmolsukki/)Â Â Â
[](https://twitter.com/anmolsukki)Â Â Â
[](https://www.instagram.com/anmolsukki/)Â Â Â
[](https://join.slack.com/t/anmolsukki/shared_invite/zt-k7cfber5-JVl_kGaNdNqvwsMADPiUWg)Â Â Â
[](https://stackoverflow.com/users/10825957/anmol-kumar-singh)