
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
@freakycoder/react-native-single-select
Advanced tools
Customizable & Easy to Use Single Select Library for React Native
| Dark Theme | Light Theme |
|
|
Add the dependency:
npm i @freakycoder/react-native-single-select
"fuse.js": ">= 6.4.1",
import RNSingleSelect, {
ISingleSelectDataType,
} from "@freakycoder/react-native-single-select";
<RNSingleSelect
data={staticData}
darkMode
onSelect={(selectedItem: ISingleSelectDataType) =>
console.log("SelectedItem: ", selectedItem)
}
/>
You must use this format for generating menu bar item.
const staticData: Array<ISingleSelectDataType> = [
{ id: 0, value: "Euismod Justo" },
{ id: 1, value: "Risus Venenatis" },
{ id: 2, value: "Vestibulum Ullamcorper" },
{ id: 3, value: "Lorem Nibh" },
{ id: 4, value: "Ligula Amet" },
];
OR with ImageSource
const staticData: Array<ISingleSelectDataType> = [
{ id: 0, value: "Euismod Justo", imageSource: require("./assets/..") },
{ id: 1, value: "Risus Venenatis", imageSource: { uri: "...url" } },
{ id: 1, value: "Risus Venenatis", imageSource: null },
];
Also, here is the interface of ISingleSelectDataType:
export interface ISingleSelectDataType {
id: number;
value: string;
imageSource?: any;
data?: any;
}
| Property | Type | Default | Description |
|---|---|---|---|
| onSelect | function | undefined | set the selection function when a menu item is selected |
| data | Array | undefined | set the menu item data array for generating menu bar items |
| width | number | 250 | change the width of the component |
| height | number | 50 | change the height of the main single select button |
| darkMode | boolean | false | change the theme of the component to dark theme |
| placeholder | string | "Select" | change the placeholder of the single select component |
| imageHeight | number | 25 | change the image source's menu item's image height |
| imageWidth | number | 25 | change the image source's menu item's image width |
| ImageComponent | component | Image | set your own custom Image component instead of default Image one |
| TextComponent | component | Text | set your own custom Text component instead of default Text one |
| buttonContainerStyle | ViewStyle | default | change/override the top of the single select button (the main one) |
| menuBarContainerStyle | ViewStyle | default | change/override the top of the single select bottom menu bar |
| arrowImageStyle | ImageStyle | default | change/override the top of the arrow image's style |
| menuItemTextStyle | TextStyle | default | change/override the top of the each menu bar's item text style |
| disableAbsolute | boolean | false | if you do not want to use the library without absolute to fix bottom menubar's overlaps simply make it true |
| menuBarContainerWidth | number | 250 | change the bottom menu bar's width |
| menuBarContainerHeight | number | 150 | change the bottom menu bar's height |
| disableFilterAnimation | boolean | false | disable the filter animation for huge lists (especially on Android) |
Heavily Inspired by Manuel Rovira Dribbble
FreakyCoder, kurayogun@gmail.com
React Native Single Select is available under the MIT license. See the LICENSE file for more info.
FAQs
Customizable & Easy to Use Single Select Library for React Native
The npm package @freakycoder/react-native-single-select receives a total of 76 weekly downloads. As such, @freakycoder/react-native-single-select popularity was classified as not popular.
We found that @freakycoder/react-native-single-select 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
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.