
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
carousel-react
Advanced tools
install
npm install --save-dev carousel-react style-loader css-loader
webpack.config.js
// add loader
{
test: /\.css$/,
loader: "style-loader!css-loader"
}
import
import Carousel from 'carousel-react'
use
<Carousel
previous='./p_l.png'
next='./p_r.png'
countDown={1}
bannerClick={item => console.log(item)}
setCarouselRestart={handle => this.carouselRestart = handle}
banners={['3.jpg',
'1.jpg',
'2.jpg',
'3.jpg',
'1.jpg']}/>
or
<Carousel
previous='./p_l.png'
next='./p_r.png'
countDown={1}
imgKey='imgUrl'
bannerClick={item => console.log(item)}
setCarouselRestart={handle => this.carouselRestart = handle}
banners={[{
imgUrl: '3.jpg'
},
{
imgUrl: '1.jpg'
},
{
imgUrl: '2.jpg'
},
{
imgUrl: '3.jpg'
},
{
imgUrl: '1.jpg'
}]}/>
previous: previous img
next: next img
countDown: countDown time for auto carousel, optional
imgKey: how to get img from banners, optional
banners: array for show, support array with string or object, if object ,must set imgKey
you must put the origin first item on the last, and put the origin last on the first
bannerClick: callback, param is banners's absolute item, optional
carouselRestart: component's restart func, optional, if you get data later, it will be required
FAQs
carousel with imgs
We found that carousel-react 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 uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.