Home > OS >  How should I create Country Code Text Input Box in React Native?
How should I create Country Code Text Input Box in React Native?

Time:01-17

enter image description here

How should I create Country Code Text Input Box in React Native?

Please tell me the code for the component and the style sheet too. I already create the code for the text input box, but I just stuck how should I add the country code in the input text box.

CodePudding user response:

Here is the best third-party library for this: https://www.npmjs.com/package/react-native-phone-number-input

Or If you do not want to use these then use a dropdown picker you can do it. In this, you have to take all country code data yourself. https://www.npmjs.com/package/react-native-element-dropdown

I recommend you use the first one.

  • Related