
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
codepunter-react-wheelpicker
Advanced tools
A customizable React wheel picker bringing iOS-like functionality to the web, maintained by CodePunter.
A customizable React wheel picker bringing iOS-like functionality to the web! Supports extensive customization, including selected item styles, animations, and more.
Install the package using npm:
npm install codepunter-react-wheelpicker
The WheelPicker component can be imported and used to render a highly customizable wheel-style picker.
import WheelPicker from "codepunter-react-wheelpicker";
import React, { useState } from "react";
import WheelPicker from "codepunter-react-wheelpicker";
const App: React.FC = () => {
const data = [
"Intro to Data Science",
"Big Data",
"Design and Analysis of Algorithms",
"Operating Systems",
"Cloud Computing",
"Principles of Database Systems",
];
const [selection, setSelection] = useState(data[3]); // Default: "Operating Systems"
const [defaultSelection, setDefaultSelection] = useState(3);
return (
<div>
<h2>Choose a subject</h2>
<div
className="selected"
onClick={() => console.log("Selection clicked!")}
>
{selection}
</div>
<WheelPicker
data={data}
height={50}
fontSize={16}
parentHeight={200}
defaultSelection={defaultSelection}
selectedBackgroundColor="#4CAF50"
selectedTextColor="#FFF"
unselectedTextColor="#888"
updateSelection={(selectedIndex) => {
setSelection(data[selectedIndex]);
setDefaultSelection(selectedIndex);
}}
scrollerId="subject-picker"
animation="flat"
selectedItemStyles={{
border: "2px solid #000",
borderRadius: "5px",
padding: "5px",
}}
disableTextHighlight={true}
/>
</div>
);
};
export default App;
import React from "react";
import WheelPicker from "codepunter-react-wheelpicker";
class App extends React.Component {
constructor() {
super();
this.state = {
data: [
"Intro to Data Science",
"Big Data",
"Design and Analysis of Algorithms",
"Operating Systems",
"Cloud Computing",
"Principles of Database Systems",
],
defaultSelection: 3,
selection: "Operating Systems",
};
}
render() {
return (
<div>
<h2>Choose a subject</h2>
<div
className="selected"
onClick={() => console.log("Selection clicked!")}
>
{this.state.selection}
</div>
<WheelPicker
data={this.state.data}
height={50}
fontSize={15}
parentHeight={200}
defaultSelection={this.state.defaultSelection}
selectedBackgroundColor="#FF5722"
selectedTextColor="#FFF"
unselectedTextColor="#666"
updateSelection={(selectedIndex) =>
this.setState({
selection: this.state.data[selectedIndex],
defaultSelection: selectedIndex,
})
}
scrollerId="subject-picker-class"
animation="wheel"
selectedItemStyles={{
border: "2px dashed #673AB7",
padding: "5px",
}}
disableTextHighlight={false}
/>
</div>
);
}
}
export default App;
Here’s a comprehensive list of props available for the WheelPicker:
scrollerId (String) - RequiredA unique string identifier for the picker instance. Each picker on the page must have a unique scrollerId.
data (Array of Strings) - RequiredAn array of strings used to populate the picker options.
animation (String)Defines the animation style for the picker. Possible values:
'flat' (default)'wheel'height (Number)Specifies the height of each item in the picker.
40parentHeight (Number)Specifies the height of the picker container. Defaults to:
(#items in data) * height
fontSize (Number)The font size for the picker items.
16defaultSelection (Number)The index of the item to be selected by default when the picker is initialized.
updateSelection (Function)A callback function that receives the index of the selected item. Use this to update the parent component's state.
selectedBackgroundColor (String)The background color for the currently selected item.
"blue"selectedTextColor (String)The text color for the currently selected item.
"white"unselectedTextColor (String)The text color for unselected items.
"black"selectedItemStyles (Object)Allows you to apply custom styles (e.g., borders, shadows) to the selected item. Example:
selectedItemStyles={{
border: "2px solid #4CAF50",
borderRadius: "5px",
boxShadow: "0 0 5px rgba(0, 0, 0, 0.2)",
}}
disableTextHighlight (Boolean)If true, disables text selection in the picker to ensure a smoother scrolling experience.
falseDerrick Mensah Torkornoo
Founder of CodePunter IT Solutions
Licensed under the ISC License.
Feel free to submit pull requests or report issues on the GitHub Repository.
FAQs
A customizable React wheel picker bringing iOS-like functionality to the web, maintained by CodePunter.
The npm package codepunter-react-wheelpicker receives a total of 1 weekly downloads. As such, codepunter-react-wheelpicker popularity was classified as not popular.
We found that codepunter-react-wheelpicker 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

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.