Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
re-carousel
Advanced tools
Minimal carousel component for React.
demo: https://amio.github.io/re-carousel/
import Carousel from 're-carousel'
then:
<Carousel auto>
<div style={{backgroundColor: 'tomato', height: '100%'}}>Frame 1</div>
<div style={{backgroundColor: 'orange', height: '100%'}}>Frame 2</div>
<div style={{backgroundColor: 'orchid', height: '100%'}}>Frame 3</div>
</Carousel>
All attributes are optional.
axis
{Enum} 'x'
or 'y'
('x'
by default)
loop
{Boolean} true
or false
(false
by default) toggle loop mode.
auto
{Boolean} true
or false
(false
by default) toggle auto sliding.
interval
{Number} (4000
ms by default) interval for auto sliding.
duration
{Number} (300
ms by default) duration for animation.
onTransitionEnd
{Function({ prev: HTMLElement, current: HTMLElement, next: HTMLElement})} on frames transition end callback.
widgets
{Array of ReactClass} Indicator and switcher could be various,
so it's not builtin. Here's some example custom widgets
(dots indicator,
prev/next buttons, keyboard navigation):
import Carousel from 're-carousel'
import IndicatorDots from './indicator-dots'
import Buttons from './buttons'
export default function carousel () {
return <Carousel loop auto widgets={[IndicatorDots, Buttons]}>
<div style={{backgroundColor: 'tomato', height: '100%'}}>Frame 1</div>
<div style={{backgroundColor: 'orange', height: '100%'}}>Frame 2</div>
<div style={{backgroundColor: 'orchid', height: '100%'}}>Frame 3</div>
</Carousel>
}
frames
{Array of ReactElement} If you want to create frames programmatically,
use this attribute:
import Carousel from 're-carousel'
export default function carousel (props) {
const frames = props.frameArray.map((frame, i) => {
return <div>Frame {i}</div>
})
return <Carousel auto frames={frames}>
<span>These children element will be appended to Carousel,</span>
<span>as normal element other than "frame".</span>
</Carousel>
}
className
{String} Custom class name.
npm run start # start local dev server
npm run build # build lib
npm run test # run tests
FAQs
Minimal carousel component for React
The npm package re-carousel receives a total of 252 weekly downloads. As such, re-carousel popularity was classified as not popular.
We found that re-carousel 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.