
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-slider-modal
Advanced tools
react slider modal slide in and slide out a div at a certain position.Option to change animation on slider like- fade, zoom, bounce, slide; default it is slide
##React-Slider-Modal
npm install react-slider-modal
npm install animation.css
**Dependency ** Please add animation.css as a dependency on your project
import slider from 'react-slider-modal';
<Slider render={
// function or component
} id="" direction="right" />
/* or */
<Slider id="" direction="right" >
// html , component or function
</Slider>
**Props **
##Example 1:
import React, { useState } from 'react';
import Slider from 'react-slider-modal';
import 'animate.css/animate.min.css'
function App() {
const [slideShow, setSlideShow] = useState(false)
const htmlData = () => {
return (
<>
<div className="slider-container">
<div className="sliderHeader">Create Lead</div>
<div className="sliderBody">
<div className="sliderLeftBox">
Hello World
</div>
<div className="sliderRightBox">
Right Box
</div>
</div>
<div className="sliderFooter">
<button className="btn btn-primary"
onClick={() => setSlideShow(false)}>Cancel</button>
</div>
</div>
</>
)
}
return (
<>
<button onClick={() => { setSlideShow(!slideShow) }}>Slide Me</button>
<Slider
id="demoID2"
animation="zoom"
speed="fast"
closeIcon={(e)=> {setSlideShow(e)}}
toggle={slideShow}
sliderStyle={{
"width": "500px",
"height": "100%",
"top": "0px"
}}
closeModal={() => { setSlideShow(false)}
direction="right"
render={htmlData()} />
className=""
</>
);
}
export default App
##Example 2:
import React, { useState } from 'react';
import Slider from 'react-slider-modal';
import 'animate.css/animate.min.css'
const sliderStyle ={{
"width": "500px",
"height": "400px",
"right": "100px",
"top": "50px"
}
function App() {
const [slideShow, setSlideShow] = useState(false)
return (
<>
<button onClick={() => { setSlideShow(!slideShow) }}>Slide Me</button>
<Slider id="demoID3" className="" direction ="top"
size="medium"
animation="slide"
closeModal={(e)=> {setSlideShow(e)}}
toggle={slideShow}
closeIcon={() => { setSlideShow(false)}}
direction="right" >
<div className="slider-container">
<div className="sliderHeader">Create Lead</div>
<div className="sliderBody">
<div className="sliderLeftBox">
Hello World
</div>
<div className="sliderRightBox">
Right Box
</div>
</div>
<div className="sliderFooter">
<button className="btn btn-primary"
onClick={() => setSlideShow(false)}>Cancel</button>
</div>
</div>
</Slider>
</>
);
}
export default App
FAQs
react slider modal slide in and slide out a div at a certain position.Option to change animation on slider like- fade, zoom, bounce, slide; default it is slide
We found that react-slider-modal 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

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