
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
react-slideshow-image
Advanced tools
A simple slideshow component built with react that supports slide, fade and zoom effects. For full documentation click here
npm install react-slideshow-image -S
yarn add react-slideshow-image
You need to import the css style, you can do that by adding to the js file
import 'react-slideshow-image/dist/styles.css'
or to your css file
@import "react-slideshow-image/dist/styles.css";
You can use three different effects of the slideshow. Check examples
You can use this playground to tweak some values
import React from 'react';
import { Slide } from 'react-slideshow-image';
import 'react-slideshow-image/dist/styles.css'
const slideImages = [
'images/slide_2.jpg',
'images/slide_3.jpg',
'images/slide_4.jpg'
];
const Slideshow = () => {
return (
<div className="slide-container">
<Slide>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[0]})`}}>
<span>Slide 1</span>
</div>
</div>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[1]})`}}>
<span>Slide 2</span>
</div>
</div>
<div className="each-slide">
<div style={{'backgroundImage': `url(${slideImages[2]})`}}>
<span>Slide 3</span>
</div>
</div>
</Slide>
</div>
)
}
You can use this playground to tweak some values
import React from 'react';
import { Fade } from 'react-slideshow-image';
import 'react-slideshow-image/dist/styles.css'
const fadeImages = [
'images/slide_5.jpg',
'images/slide_6.jpg',
'images/slide_7.jpg'
];
const Slideshow = () => {
return (
<div className="slide-container">
<Fade>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[0]} />
</div>
<h2>First Slide</h2>
</div>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[1]} />
</div>
<h2>Second Slide</h2>
</div>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[2]} />
</div>
<h2>Third Slide</h2>
</div>
</Fade>
</div>
)
}
You can use this playground to tweak some values
import React from 'react';
import { Zoom } from 'react-slideshow-image';
import 'react-slideshow-image/dist/styles.css'
const images = [
'images/slide_2.jpg',
'images/slide_3.jpg',
'images/slide_4.jpg',
'images/slide_5.jpg',
'images/slide_6.jpg',
'images/slide_7.jpg'
];
const Slideshow = () => {
return (
<div className="slide-container">
<Zoom scale={0.4}>
{
images.map((each, index) => <img key={index} style={{width: "100%"}} src={each} />)
}
</Zoom>
</div>
)
}
Click here for all the properties you can use to customize the behavior of the slideshow.
Click here for all the methods you can call on the slideshow
The type bindings have not been added yet to the types registry yet. It's a WIP. You can follow this instruction
FAQs
An image slideshow with react
The npm package react-slideshow-image receives a total of 22,366 weekly downloads. As such, react-slideshow-image popularity was classified as popular.
We found that react-slideshow-image demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.