
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
react-native-platform-searchbar
Advanced tools
A customizable SearchBar component for React Native. Includes platform specific designs for iOS and Android. Written in Typescript.
npm install react-native-platform-searchbar --save
or yarn add react-native-platform-searchbar
import SearchBar from 'react-native-platform-searchbar';
const Example = () => {
const [value, setValue] = useState('');
<SearchBar
value={value}
onChangeText={setValue}
style={styles.searchBar}
/>;
};
import SearchBar from 'react-native-platform-searchbar';
const Example = () => {
const [value, setValue] = useState('');
<SearchBar
value={value}
onChangeText={setValue}
placeholder="Search"
theme="light"
platform="ios"
style={styles.searchBar}
>
{loading ? (
<ActivityIndicator style={{ marginRight: 10 }} />
) : undefined}
</SearchBar>;
};
Name | Type | Default | Description |
---|---|---|---|
value | string | REQUIRED | SearchBar value |
onChangeText | (string) => void | REQUIRED | called when SearchBar value changes |
theme | "light" | "dark" | "light" | SearchBar theme |
platform | "default" | "ios" | "android" | "default" | which SearchBar version to use. "default" uses current platform |
cancelText | string | "Cancel" | cancel button text. Only visible in iOS SearchBar |
placeholderTextColor | string | different shades of gray depending on theme and platform | Color of placeholderText |
iconColor | string | same as placeholderTextColor | color of icons (Search, Clear...) |
leftIcon | ReactElement | search icon | custom icon to show on the left |
style | object (ViewStyle) | undefined | custom style for the outer container view |
inputStyle | object (TextStyle) | undefined | custom style for the TextInput component |
onCancel | () => void | undefined | callback that gets called when cancel button is pressed |
onClear | () => void | undefined | callback that gets called when clear button is pressed |
All TextInput Props are also supported.
FAQs
A searchbar component for React Native
The npm package react-native-platform-searchbar receives a total of 283 weekly downloads. As such, react-native-platform-searchbar popularity was classified as not popular.
We found that react-native-platform-searchbar 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
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.