Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-leaf-carousel

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-leaf-carousel - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

package.json
{
"name": "react-leaf-carousel",
"version": "2.0.1",
"version": "2.0.2",
"description": "React simple infinite carousel with lazy loading and responsive support",

@@ -9,3 +9,3 @@ "scripts": {

"update:packages": "node wipe-dependencies.js && rm -rf node_modules && npm update --save-dev && npm update --save",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release --no-ci"
},

@@ -12,0 +12,0 @@ "repository": {

@@ -10,7 +10,7 @@ import React from 'react';

swipe
autoCycle
lazyLoad
dots
lazyload
paging
showSides
responsive
breakpoints={[

@@ -17,0 +17,0 @@ {

# react-leaf-carousel
React simple infinite carousel with lazy loading and responsive support.

@@ -40,4 +41,4 @@

showSides={true}
sidesOpacity={.5}
sideSize={.1}
sidesOpacity={0.5}
sideSize={0.1}
slidesToScroll={4}

@@ -49,4 +50,4 @@ slidesToShow={4}

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=55b64e&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=55b64e&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -56,4 +57,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=904098&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=904098&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -63,4 +64,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ef4d9c&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ef4d9c&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -70,4 +71,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=00f3d1&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=00f3d1&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -77,4 +78,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=00ffff&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=00ffff&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -84,4 +85,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ee1f34&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ee1f34&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -91,4 +92,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=91b4c0&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=91b4c0&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -98,4 +99,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ff6347&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ff6347&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -105,4 +106,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ebbfbf&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ebbfbf&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -112,4 +113,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=def1f9&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=def1f9&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -119,4 +120,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=cdf2c6&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=cdf2c6&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -126,4 +127,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=9fa616&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=9fa616&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -133,4 +134,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=2c4caa&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=2c4caa&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -140,4 +141,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=44e3e1&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=44e3e1&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -147,4 +148,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ff6666&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ff6666&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -154,4 +155,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=94e1e3&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=94e1e3&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -161,4 +162,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=29083c&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=29083c&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -168,4 +169,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ffff99&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ffff99&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -175,4 +176,4 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=616161&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=616161&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>

@@ -182,9 +183,9 @@ </div>

<img
alt=''
src='https://placeholdit.imgix.net/~text?txtsize=20&bg=ed7ebe&txtclr=ffffff&txt=215%C3%97215&w=215&h=215'
alt=""
src="https://placeholdit.imgix.net/~text?txtsize=20&bg=ed7ebe&txtclr=ffffff&txt=215%C3%97215&w=215&h=215"
/>
</div>
</InfiniteCarousel>
,
document.getElementById('root'));
</InfiniteCarousel>,
document.getElementById('root')
);
```

@@ -194,29 +195,28 @@

| Property | Type | Description | Default |
| ---------------- | ---- | ----------- | ------- |
| arrows | bool | Enables tabbing and arrow key navigation | true |
| dots | bool | Enable dot pagination | false |
| paging | bool | Enable 1/x pagination | false |
| pagingSeparator | string | 1/x pagination separator | '/' |
| lazyLoad | bool | Lazy load slides that are not visible at first load | true |
| swipe | bool | Add swipe event to scroll between slide pages | true |
| animationDuration | int | Slide animation duration | 500 |
| slidesToShow | int | Number of slides to display | 1
| slidesToScroll | int | Number of slides to scroll | 1 |
| slidesSpacing | int | Margin between slides | 10 |
| autoCycle | bool | Enables autocycle between slide pages | false |
| cycleInterval | bool | Autocycle interval duration | 5000 |
| pauseOnHover | bool | Pauses autocycle | true |
| responsive | bool | Enables breakpoints | true |
| breakpoints | array | Array of objects in the form of ```{ breakpoint: int, settings: { ... } }``` | [] |
| placeholderImageSrc| string | placeholder image source | base64 gif image 1x1 |
| nextArrow | React element | Optional custom arrow | null |
| prevArrow | React element | Optional custom arrow | null |
| scrollOnDevice | bool | Adds scroll functionality on touch devices instead of normal swipe, this disables lazy-loading, infinite navigation, arrows and dots | false |
| showSides | bool | Show outer prev/next slides of the current slide page | false |
| sidesOpacity | int | Side slides opacity amount | 1 |
| sideSize | int | Fraction visible of prev/next slides, when ```showSides``` is enabled | .5 |
| incrementalSides | bool | Dynamic ```sideSize``` depending on the browser's width and responsive ```breakpoints```. Increments or decrements from max size 50% to min size 0% when expanding or narrowing the browser. | false |
| onSlideChange | func | onSlideChange event | - |
| onNextClick | func | onNextClick arrow event | - |
| onPreviousClick | func | onPreviousClick arrow event | - |
| Property | Type | Description | Default |
| ------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| arrows | bool | Enables tabbing and arrow key navigation | true |
| dots | bool | Enable dot pagination | false |
| paging | bool | Enable 1/x pagination | false |
| pagingSeparator | string | 1/x pagination separator | '/' |
| lazyLoad | bool | Lazy load slides that are not visible at first load | true |
| swipe | bool | Add swipe event to scroll between slide pages | true |
| animationDuration | int | Slide animation duration | 500 |
| slidesToShow | int | Number of slides to display | 1 |
| slidesToScroll | int | Number of slides to scroll | 1 |
| slidesSpacing | int | Margin between slides | 10 |
| autoCycle | bool | Enables autocycle between slide pages | false |
| cycleInterval | bool | Autocycle interval duration | 5000 |
| pauseOnHover | bool | Pauses autocycle | true |
| breakpoints | array | Array of objects in the form of `{ breakpoint: int, settings: { ... } }` | [] |
| placeholderImageSrc | string | placeholder image source | base64 gif image 1x1 |
| nextArrow | React element | Optional custom arrow | null |
| prevArrow | React element | Optional custom arrow | null |
| scrollOnDevice | bool | Adds scroll functionality on touch devices instead of normal swipe, this disables lazy-loading, infinite navigation, arrows and dots | false |
| showSides | bool | Show outer prev/next slides of the current slide page | false |
| sidesOpacity | int | Side slides opacity amount | 1 |
| sideSize | int | Fraction visible of prev/next slides, when `showSides` is enabled | .5 |
| incrementalSides | bool | Dynamic `sideSize` depending on the browser's width and responsive `breakpoints`. Increments or decrements from max size 50% to min size 0% when expanding or narrowing the browser. | false |
| onSlideChange | func | onSlideChange event | - |
| onNextClick | func | onNextClick arrow event | - |
| onPreviousClick | func | onPreviousClick arrow event | - |

@@ -206,13 +206,18 @@ import React, { Component, Children } from 'react';

this.setState({
activePage,
childrenCount,
slidesCount,
slidesWidth,
slidePages,
singlePage,
lazyLoadedList,
visibleSlideList,
sideSize,
});
this.setState(
{
activePage,
childrenCount,
slidesCount,
slidesWidth,
slidePages,
singlePage,
lazyLoadedList,
visibleSlideList,
sideSize,
},
() => {
this.playAutoCycle();
}
);
};

@@ -817,4 +822,4 @@

init = () => {
const { responsive } = this.props;
if (responsive) {
const { breakpoints } = this.props;
if (breakpoints.length > 0) {
this.setupBreakpointSettings();

@@ -835,3 +840,2 @@ } else {

this.setDimensions();
this.playAutoCycle();
}

@@ -932,8 +936,8 @@ );

onMouseDown={!disableSwipeEvents ? this.onSwipeStart : null}
onMouseLeave={dragging || !disableSwipeEvents ? this.onSwipeEnd : null}
onMouseMove={dragging || !disableSwipeEvents ? this.onSwipeMove : null}
onMouseLeave={dragging && !disableSwipeEvents ? this.onSwipeEnd : null}
onMouseMove={dragging && !disableSwipeEvents ? this.onSwipeMove : null}
onMouseUp={!disableSwipeEvents ? this.onSwipeEnd : null}
onTouchCancel={dragging || !disableSwipeEvents ? this.onSwipeEnd : null}
onTouchCancel={dragging && !disableSwipeEvents ? this.onSwipeEnd : null}
onTouchEnd={!disableSwipeEvents ? this.onSwipeEnd : null}
onTouchMove={dragging || !disableSwipeEvents ? this.onSwipeMove : null}
onTouchMove={dragging && !disableSwipeEvents ? this.onSwipeMove : null}
onTouchStart={!disableSwipeEvents ? this.onSwipeStart : null}

@@ -968,3 +972,2 @@ >

pauseOnHover: PropTypes.bool, // eslint-disable-line react/no-unused-prop-types
responsive: PropTypes.bool,
breakpoints: PropTypes.arrayOf(PropTypes.object),

@@ -1000,3 +1003,2 @@ placeholderImageSrc: PropTypes.string, // eslint-disable-line react/no-unused-prop-types

pauseOnHover: true,
responsive: true,
breakpoints: [],

@@ -1003,0 +1005,0 @@ placeholderImageSrc: '',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc