New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@digieggs/react-native-calling-code-picker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digieggs/react-native-calling-code-picker

A searchable dropdown component for selecting a country code for your phone number input.

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by166.67%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Calling Code Picker

npm NPM npm

A searchable dropdown component to select a country code for your phone number input.

For Managed Workflow users using Expo

This component is not supported in the managed workflow for expo for the time being.

Getting started

npm install @digieggs/react-native-calling-code-picker --save

or

yarn add @digieggs/react-native-calling-code-picker

Also you need to manually install react-native-svg library for the icons in the component

npm install react-native-svg --save

or

yarn add react-native-svg

For react-native@0.60.0 or above

As react-native@0.60.0 or above supports autolinking, so there is no need to run linking process. Read more about autolinking here.

iOS

CocoaPods on iOS needs this extra step

npx pod-install
Android

No additional step is required.

Usage

First of all, import the component.

import { CallingCodePicker } from 'react-native-calling-code-picker';

Then use it like this.

const [selectedCallingCode, setSelectedCallingCode] = useState('90'); // Give it a default value to show an initial flag and a code

return (
  <CallingCodePicker
    selectedValue={selectedCallingCode}
    onValueChange={value => setSelectedCallingCode(value)}
  />
);

Props


Reference

Props

selectedValue

Value matching value of one of the items. Can be a string.

TypeRequired
stringYes

onValueChange

Callback for when an item is selected. This is called with the following parameters:

  • itemValue: the value of the item that was selected
TypeRequired
functionYes

togglerContainerStyle

Style to apply to the toggler container container. (for ex. you can give absolute positioning to align it inside the input.)

TypeRequired
StylePropNo

togglerLabelStyle

SStyle to apply to the picker toggler label.

TypeRequired
StylePropNo

listContainerStyle

Style to apply to the list container.

TypeRequired
StylePropNo

searchInputStyle

Style to apply to the search input.

TypeRequired
StylePropNo

listStyle

Style to apply to the FlatList component.

TypeRequired
StylePropNo

pickerItemLabelStyle

Style to apply to each of the item labels.

TypeRequired
StylePropNo

Credits

Keywords

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc