![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
infinite-react-carousel
Advanced tools
Readme
npm
npm install infinite-react-carousel --save
yarn
yarn add infinite-react-carousel
import React from 'react';
import Slider from 'infinite-react-carousel';
const SimpleSlider = () => (
<Slider dots>
<div>
<h3>1</h3>
</div>
<div>
<h3>2</h3>
</div>
<div>
<h3>3</h3>
</div>
<div>
<h3>4</h3>
</div>
<div>
<h3>5</h3>
</div>
</Slider>
);
Prop | Description | Default | Type |
---|---|---|---|
rows | Number of rows per slide in the slider, (enables grid mode) | 1 | Number |
slidesPerRow | Number of slides to display in grid mode, this is useful with rows option | 1 | Number |
slidesToShow | How many slides to show in one frame | 1 | Number |
className | "" | String | |
centerMode | Center current slide | false | Boolean |
swipe | Enable/disable swiping to change slides | true | Boolean |
adaptiveHeight | Adjust the slide's height automatically | false | Boolean |
centerPadding | 50 | String, Number | |
initialSlide | Index of first slide | false | Boolean, Number |
pauseOnHover | Prevents autoplay while hovering on track | true | Boolean |
autoplay | Enable/disable slider autoplay | false | Boolean |
autoplayScroll | How many slides to scroll when autoplay is true | 1 | Number |
autoplaySpeed | Delay between each auto scroll (in milliseconds) | 3000 | Number |
beforeChange | Before Index change callback. (oldIndex, newIndex) => ... | null | Function |
afterChange | Index change callback. index => ... | null | Function |
duration | Transition duration in milliseconds | 200 | Number |
shift | Set the spacing of the center item | 0 | Number |
arrows | Enable/disable arrow button | true | Boolean |
arrowsBlock | true | Boolean | |
arrowsScroll | How many slides to scroll when click arrows button | 1 | Number |
prevArrow | Custom prev arrows button | null | Element |
nextArrow | Custom next arrows button | null | Element |
dots | Enable/disable dots | false | Boolean |
dotsClass | CSS class for dots | "carousel-dots" | String |
dotsScroll | How many slides to scroll on one page | 1 | Number |
appendDots | Custom dots templates. Works same as customPaging | (dots) => <ul style={{ display: 'block' }}>{dots}</ul> | Function |
customPaging | Custom paging templates | (i) => <button type="button">{i + 1}</button> | Function |
onReszie | detect carousel resize | (e) => {} | Function |
onSwipe | Callback after slide changes by swiping | (direction) => {} | Function |
accessibility | Enable tabbing and arrow key navigation | true | Boolean |
wheel | Enable mouse wheel to slide item | false | Boolean |
wheelScroll | How many slides to scroll when wheel trigger | 1 | Number |
virtualList | false | Boolean | |
overScan | Number of items to render before/after the visible slice of the carousel | 2 | Number |
Name | Description |
---|---|
slickNext | Go to the next slide |
slickPrev | Go to the previous slide |
slickGoTo | Go to any slide |
slickPause | Pause the autoplay |
slickPlay | Start the autoplay |
Want to run demos locally
git clone https://github.com/g787543/infinite-react-carousel.git
cd infinite-react-carousel
npm
npm install
npm run dev
yarn
yarn
yarn dev
The project is licensed under the terms of MIT license
FAQs
Infinite carousel for react
The npm package infinite-react-carousel receives a total of 1,799 weekly downloads. As such, infinite-react-carousel popularity was classified as popular.
We found that infinite-react-carousel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.