Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 65af8c6

Browse files
committed
Added sponsor
1 parent 4174c18 commit 65af8c6

1 file changed

Lines changed: 36 additions & 16 deletions

File tree

README.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# react-multi-carousel 👋
2+
23
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors)
34

45
Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering).
@@ -26,6 +27,16 @@ Production-ready, lightweight fully customizable React carousel component that r
2627

2728
![demo](https://media.giphy.com/media/3octyw2XELzfaplNUm/giphy.gif)
2829

30+
### Hello world!
31+
32+
We are on a very excited journey towards version 3.0 of this component which will be rewritten in hooks/context completely. It means smaller bundle size, performance improvement and easier customization of the component and so many more benefits.
33+
34+
It would mean so much if you could provide help towards the further development of this project as we do this open source work in our own free time especially during this covid-19 crisis.
35+
36+
If you are using this component seriously, please donate or talk to your manager as this project increases your income too. It will help us make releases, fix bugs, fulfill new feature requests faster and better.
37+
38+
[Become a backer/sponsor](https://opencollective.com/react-multi-carousel) to get your logo/image on our README on Github with a link to your site.
39+
2940
### Features.
3041

3142
- Server-side rendering
@@ -111,20 +122,20 @@ const responsive = {
111122
superLargeDesktop: {
112123
// the naming can be any, depends on you.
113124
breakpoint: { max: 4000, min: 3000 },
114-
items: 5,
125+
items: 5
115126
},
116127
desktop: {
117128
breakpoint: { max: 3000, min: 1024 },
118-
items: 3,
129+
items: 3
119130
},
120131
tablet: {
121132
breakpoint: { max: 1024, min: 464 },
122-
items: 2,
133+
items: 2
123134
},
124135
mobile: {
125136
breakpoint: { max: 464, min: 0 },
126-
items: 1,
127-
},
137+
items: 1
138+
}
128139
};
129140
<Carousel responsive={responsive}>
130141
<div>Item 1</div>
@@ -144,18 +155,18 @@ const responsive = {
144155
desktop: {
145156
breakpoint: { max: 3000, min: 1024 },
146157
items: 3,
147-
slidesToSlide: 3, // optional, default to 1.
158+
slidesToSlide: 3 // optional, default to 1.
148159
},
149160
tablet: {
150161
breakpoint: { max: 1024, min: 464 },
151162
items: 2,
152-
slidesToSlide: 2, // optional, default to 1.
163+
slidesToSlide: 2 // optional, default to 1.
153164
},
154165
mobile: {
155166
breakpoint: { max: 464, min: 0 },
156167
items: 1,
157-
slidesToSlide: 1, // optional, default to 1.
158-
},
168+
slidesToSlide: 1 // optional, default to 1.
169+
}
159170
};
160171
<Carousel
161172
swipeable={false}
@@ -194,7 +205,7 @@ You custom arrows will receive a list of props/state that's passed back by the c
194205
const CustomRightArrow = ({ onClick, ...rest }) => {
195206
const {
196207
onMove,
197-
carouselState: { currentSlide, deviceType },
208+
carouselState: { currentSlide, deviceType }
198209
} = rest;
199210
// onMove means if dragging or swiping in progress.
200211
return <button onClick={() => onClick()} />;
@@ -252,19 +263,27 @@ You custom dots will receive a list of props/state that's passed back by the car
252263

253264
```js
254265
const CustomDot = ({ onClick, ...rest }) => {
255-
const { onMove, index, active, carouselState: { currentSlide, deviceType } } = rest;
266+
const {
267+
onMove,
268+
index,
269+
active,
270+
carouselState: { currentSlide, deviceType }
271+
} = rest;
256272
const carouselItems = [CarouselItem1, CaourselItem2, CarouselItem3];
257273
// onMove means if dragging or swiping in progress.
258274
// active is provided by this lib for checking if the item is active or not.
259275
return (
260-
<button className={active ? 'active' : 'inactive'} onClick={() => onClick()}>
276+
<button
277+
className={active ? "active" : "inactive"}
278+
onClick={() => onClick()}
279+
>
261280
{React.Children.toArray(carouselItems)[index]}
262281
</button>
263-
)
264-
}
282+
);
283+
};
265284
<Carousel showDots customDot={<CustomDot />}>
266-
{carouselItems}
267-
</Carousel>
285+
{carouselItems}
286+
</Carousel>;
268287
```
269288

270289
## renderDotsOutside
@@ -517,6 +536,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
517536

518537
<!-- markdownlint-enable -->
519538
<!-- prettier-ignore-end -->
539+
520540
<!-- ALL-CONTRIBUTORS-LIST:END -->
521541

522542
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

0 commit comments

Comments
 (0)