Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
react-slideshow-lib
Advanced tools
React slideshow component supporting slide, fade.
# npm
npm install react-slideshow-lib
# yarn
yarn add react-slideshow-lib
Here's a basic example
import React from 'react';
import SlideShow from 'react-slideshow-lib';
const Example = () => {
return (
<SlideShow>
<img src="url1" />
<img src="url2" />
<img src="url3" />
<img src="url4" />
</SlideShow>
);
};
export default Example;
Navigation example
import React, { useEffect, useRef } from "react";
import SlideShow from "react-slideshow-lib";
const images = [
"https://images.unsplash.com/photo-1684529419842-6b0284bc83cb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=60",
"https://images.unsplash.com/photo-1684698937050-ae323feb1fb0?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=60",
"https://images.unsplash.com/photo-1682018667453-b8d127e055b9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=60",
"https://images.unsplash.com/photo-1681999683665-6902894af42c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=600&q=60"
];
export default function App() {
const slideRef = useRef();
useEffect(() => {
slideRef.current.pause();
}, [slideRef]);
return (
<>
<SlideShow ref={slideRef}>
{images.map((i) => (
<img src={i} />
))}
</SlideShow>
<div style={{ textAlign: "center" }}>
<a href="javascript:void(0)" onClick={() => slideRef.current.goNext()}>
next
</a>
<a href="javascript:void(0)" onClick={() => slideRef.current.goBack()}>
prev
</a>
</div>
</>
);
}
Page example
const Example = () => {
const slideRef = useRef();
useEffect(() => {
slideRef.current.pause();
}, [slideRef]);
return (
<>
<SlideShow {...args} ref={slideRef}>
{images.map(i => <img src={i} />)}
</SlideShow>
<div style={{textAlign: "center"}}>
{images.map((_, i) => (<><a href="javascript:void(0)" onClick={() => slideRef.current.goTo(i)}>{i+1}</a> </>))}
</div>
</>
)
};
export default Example;
FAQs
React slideshow component
We found that react-slideshow-lib 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.