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.
roving-ux-react
Advanced tools
Turns tedious tab UX into a controlled and stateful experience
Inspired by roving-ux by Adam Argyle
Learn more in this article by Rob Dodson on web.dev
Try it at this GUI Challenge (use tab
then left || right
arrows)
1️⃣ User's shouldn't need to tab through each item in a list to see the next list
2️⃣ Providing keyboard list UX should be easy
3️⃣ Maintaining the last focused element should be easy
npm i roving-ux-react
// import from NPM
import { useRovingIndex } from 'roving-ux-react'
const {
activeIndex, // index of the currently focused target
roverProps, // props to assign to the rover
getTargetProps, // getter function for each targets props, initialize with index
} = useRovingIndex()
const {
tabIndex, // tabIndex for rover element, should always be -1
onFocus, // focus handler to listen for nested elements receiving focus
onKeyDown, // key event handler to listen for arrow key navigation
} = roverProps
import { useRovingIndex } from 'roving-ux-react'
// just one roving ux container
// roving-ux-react will use each child initialized with `getTargetProps` as target
function Carousel() {
const { roverProps, getTargetProps } = useRovingIndex()
return (
<ul {...roverProps}>
<li {...getTargetProps(0)}>Item #1</li>
<li {...getTargetProps(1)}>Item #2</li>
<li {...getTargetProps(2)}>Item #3</li>
</ul>
)
}
FAQs
Stateful roving index for react web ui
The npm package roving-ux-react receives a total of 0 weekly downloads. As such, roving-ux-react popularity was classified as not popular.
We found that roving-ux-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’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.