
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-rwd-slideshow
Advanced tools
A simple Slideshow, very customizable, works with arrows for changing slides and also with touch, so is ready for desktop, tablet and mobile. No dependencies!!
$ npm install react-rwd-slideshow --save
Import the Slideshow component from react-rwd-slideshow and put your component/image/html/etc inside Slideshow.Item
import React from 'react';
import Slideshow from 'react-rwd-slideshow';
const Gallery = () => {
const randomImageUrl = 'https://picsum.photos/800/600?random=';
const imgStyle = {
height: '300px',
width: '100%',
borderRadius: '8px',
};
const wrapperStyle = {
width: '425px',
margin: '25px auto 50px',
};
return (
<div style={wrapperStyle}>
<Slideshow gap={100} scrollSnap showDots>
<Slideshow.Item>
<img width='100%' src='https://picsum.photos/800/600?random=1' />
</Slideshow.Item>
{[...Array(5)].map((_, index) => (
<Slideshow.Item key={index}>
<img src={`${randomImageUrl}${index}`} style={imgStyle} />
</Slideshow.Item>
))}
</Slideshow>
</div>
);
};
| Prop | Type | Default | Description |
|---|---|---|---|
| gap | Number | 0 | Space (grid-gap) for each slide in the slideshow in px |
| scrollSnap | Boolean | true | true for applying scroll-snap to slides |
| hideArrow | Boolean | false | Show/hide the arrow prev/next arrows |
| showDots | Boolean | false | Show dots indicate the current slide |
| dotColorActive | String | rgb(255 255 255 / 100%) | Valid css color value for active dot |
| dotColorInactive | String | rgb(255 255 255 / 44%) | Valid css color value for inactive dot |
| arrowLeft | Element | Custom left arrow | |
| arrowRight | Element | Custom right arrow | |
| dot | Element | Custom dot component with prop isActive | |
| customContainerStyle | Object | Style object for slideshow container | |
| slideViewerClassName | String | Classname for the slide viewer | |
| slideTrayClassName | String | Classname for the slide tray | |
| slideWrapperClassName | String | Classname for the slide wrapper | |
| slideClassName | String | Classname for the slide | |
| arrowContainerClassName | String | Classname for the arrow container | |
| arrowWrapperClassName | String | Classname for the arrow wrapper | |
| arrowClassName | String | Classname for the arrow | |
| dotWrapperClassName | String | Classname for the dot wrapper | |
| dotClassName | String | Classname for the dot selector | |
| onCurrentSlideChanged | Function | Function to get the current Slide |
const customDot = ({ isActive }) => (
<div
style={{
height: isActive ? '10px' : '5px',
width: isActive ? '10px' : '5px',
background: '#000'
}}
/>
)
<Slideshow dot={customDot} />
FAQs
React RWD Slideshow, no dependencies
The npm package react-rwd-slideshow receives a total of 0 weekly downloads. As such, react-rwd-slideshow popularity was classified as not popular.
We found that react-rwd-slideshow 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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.