kareemaly / React Items Carousel
Licence: mit
Items Carousel Built with react-motion and styled-components
Stars: ✭ 150
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to React Items Carousel
React Responsive Carousel
React.js Responsive Carousel (with Swipe)
Stars: ✭ 1,962 (+1208%)
Mutual labels: mobile, react-component, carousel
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: ✭ 2,046 (+1264%)
Mutual labels: mobile, carousel, responsive
React Grid Carousel
React responsive carousel component w/ grid layout
Stars: ✭ 29 (-80.67%)
Mutual labels: react-component, carousel
React Splide
The Splide component for React.
Stars: ✭ 32 (-78.67%)
Mutual labels: react-component, carousel
Vue Draggablecal
Not your ordinary datepicker. A Vuejs draggable date selector with a fresh responsive design, mobile ready and 0 dependencies, 17kb gzipped
Stars: ✭ 79 (-47.33%)
Mutual labels: mobile, responsive
Swiper
Most modern mobile touch slider with hardware accelerated transitions
Stars: ✭ 29,519 (+19579.33%)
Mutual labels: mobile, carousel
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (-82.67%)
Mutual labels: carousel, responsive
React Poppop
A mobile support and multi-directional modal for ReactJS
Stars: ✭ 78 (-48%)
Mutual labels: mobile, responsive
Recipes App React Native
Recipes App in React Native
Stars: ✭ 386 (+157.33%)
Mutual labels: mobile, react-component
Universal Resume
Minimal and formal résumé (CV) website template for print, mobile, and desktop. https://bit.ly/ur_demo
Stars: ✭ 1,349 (+799.33%)
Mutual labels: mobile, responsive
React Responsive Picture
A future-proof responsive image component that supports latest Picture specification
Stars: ✭ 91 (-39.33%)
Mutual labels: react-component, responsive
React Native Swipeable Parallax Carousel
React Native Swipeable Parallax Carousel
Stars: ✭ 98 (-34.67%)
Mutual labels: react-component, carousel
Scalingcarousel
A super simple carousel view with scaling transitions written in Swift
Stars: ✭ 499 (+232.67%)
Mutual labels: mobile, carousel
React Alice Carousel
React responsive component for building content galleries, content rotators and any React carousels
Stars: ✭ 419 (+179.33%)
Mutual labels: react-component, carousel
Egjs Flicking
🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
Stars: ✭ 937 (+524.67%)
Mutual labels: mobile, carousel
Vue Gallery
📷 Responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers.
Stars: ✭ 405 (+170%)
Mutual labels: mobile, carousel
React Bps
🔱 Create breakpoints to your component props
Stars: ✭ 64 (-57.33%)
Mutual labels: react-component, responsive
react-gallery-carousel
Mobile-friendly gallery carousel 🎠 with server side rendering, lazy loading, fullscreen, thumbnails, touch, mouse emulation, RTL, keyboard navigation and customisations.
Stars: ✭ 178 (+18.67%)
Mutual labels: responsive, carousel
nglp-angular-material-landing-page
NGLP is an Angular Material Landing Page.
Stars: ✭ 32 (-78.67%)
Mutual labels: responsive, carousel
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (-43.33%)
Mutual labels: mobile, react-component
react-items-carousel
Installation
$ npm install react-items-carousel --save
Demos
Example
import React, { useState } from 'react';
import ItemsCarousel from 'react-items-carousel';
export default () => {
const [activeItemIndex, setActiveItemIndex] = useState(0);
const chevronWidth = 40;
return (
<div style={{ padding: `0 ${chevronWidth}px` }}>
<ItemsCarousel
requestToChangeActive={setActiveItemIndex}
activeItemIndex={activeItemIndex}
numberOfCards={2}
gutter={20}
leftChevron={<button>{'<'}</button>}
rightChevron={<button>{'>'}</button>}
outsideChevron
chevronWidth={chevronWidth}
>
<div style={{ height: 200, background: '#EEE' }}>First card</div>
<div style={{ height: 200, background: '#EEE' }}>Second card</div>
<div style={{ height: 200, background: '#EEE' }}>Third card</div>
<div style={{ height: 200, background: '#EEE' }}>Fourth card</div>
</ItemsCarousel>
</div>
);
};
Component Props
Property | Type | Default | Description |
---|---|---|---|
children * | node[] | The cards to render in the carousel. You must specify a height for each card. | |
requestToChangeActive * | function | This function accepts the new activeItemIndex and should update your component state. | |
activeItemIndex * | int | This defines which item should be active. | |
numberOfCards | number | 3 | Number of cards to show per slide. |
infiniteLoop | boolean | false | Enable infinite loop. see Infinite loop limitations |
gutter | number | 0 | Space between cards. |
showSlither | boolean | false | If true a slither of next card will be shown. |
firstAndLastGutter | boolean | false | If true first and last cards will have twice the space. |
enablePlaceholder | boolean | false | If true, component will render placeholderItem until children are passed. |
placeholderItem | node | null | If enablePlaceholder is true, this will be rendered until children are passed. |
numberOfPlaceholderItems | number | 0 | This controls how many placeholderItem to render if enablePlaceholder is true. |
activePosition | enum ('left', 'center', 'right') | left | The position of the active item. |
rightChevron | node | null | Right chevron node. |
leftChevron | node | null | Left chevron node. |
chevronWidth | number | 0 | This value should be the width of left and right chevron. |
outsideChevron | boolean | false | If true the chevron will be rendered outside the carousel. |
alwaysShowChevrons | boolean | false | If true the chevrons will always be visible even if there were no cards to scroll. |
slidesToScroll | number | 1 | Number of cards to scroll when right and left chevrons are clicked. |
disableSwipe | boolean | false | Disables left and right swiping on touch devices. |
onStateChange | func | null | This function will be called when state change with { isFirstScroll: Boolean, isLastScroll: Boolean } . It can be used to fetch more data for example. |
classes | { wrapper: string, itemsWrapper: string, itemsInnerWrapper: string, itemWrapper: string, rightChevronWrapper: string, leftChevronWrapper: string } |
{} | An object of classes to pass to the carousel inner elements |
Infinite Loop Limitations
If infiniteLoop
was set to true, the following props are ignored
-
activePosition
: will always beleft
-
alwaysShowChevrons
: will always betrue
Contributing
To contribute, follow these steps:
- Fork this repo.
- Clone your fork.
- Run
yarn
- Run
yarn start:gh
- Goto
localhost:9000
- Add your patch then push to your fork and submit a pull request
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].