
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
react-timeroller
Advanced tools
A React Component that allows you to implement a 'briefcase-like' number picker wheel in your project
A React component for selecting a value from a range using a scrollable list. Ideal for time or value selection interfaces.
To install the react-timeroller package, use npm or yarn:
npm install react-timeroller
range (required)Array<number | string>unit (optional)stringselectedValue (required)number | stringsetSelectedValue (required)functionHere is a basic example of how to use the TimeRoller component:
import React, { useState } from 'react';
import TimeRoller from 'react-timeroller';
function App() {
const [selectedValue, setSelectedValue] = useState(2);
const range = [1, 2, 3, 4, 5];
return (
<div className="App">
<h1>Time Roller Demo</h1>
<TimeRoller
range={range}
unit="hours"
selectedValue={selectedValue}
setSelectedValue={setSelectedValue}
/>
<p>Selected value: {selectedValue}</p>
</div>
);
}
export default App;

Here's an example with the TimeRoller component working with non-time related data, such as a list of US States (and without the 'unit' prop):
import { useEffect, useState } from 'react';
import './App.css';
import TimeRoller from 'react-timeroller';
function App() {
const usStateCodes = [
"AL - Alabama",
"AK - Alaska",
"AZ - Arizona",
"AR - Arkansas",
"CA - California",
"CO - Colorado",
"CT - Connecticut",
"DE - Delaware",
"FL - Florida",
"GA - Georgia"
];
const [selectedValue, setSelectedValue] = useState(usStateCodes[0]);
useEffect(() => {
}, [selectedValue])
return (
<div className="App">
<h1>Roller Demo - State Selector</h1>
<TimeRoller
range={usStateCodes}
selectedValue={selectedValue}
setSelectedValue={setSelectedValue}
/>
<p>Selected value: {selectedValue}</p>
</div>
);
}
export default App;

Contributions are welcome! Please open an issue or submit a pull request for any bugs or improvements.
This project is licensed under the MIT License.
FAQs
A React Component that allows you to implement a 'briefcase-like' number picker wheel in your project
The npm package react-timeroller receives a total of 10 weekly downloads. As such, react-timeroller popularity was classified as not popular.
We found that react-timeroller 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.