npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-country-data

v1.0.4

Published

This lib. provide currency iso picker with search functionality

Downloads

343

Readme

🌍 react-native-country-data

A lightweight and customizable Country Picker / Country List for React Native & Expo with search functionality and country lookup by Alpha-2 codes.

✨ Emoji flags ✨ Searchable country list ✨ Alpha-2 & Alpha-3 country codes ✨ Calling codes & currency info ✨ Fully customizable styles ✨ Expo & React Native compatible

📦 Installation

Expo

bash

expo install react-native-country-data

NPM

bash

npm install react-native-country-data

Yarn

bash

yarn add react-native-country-data

🚀 Features

  • 🔍 Search countries by name
  • 🏳️ Country flags using emojis
  • 🌐 Alpha-2 (US) & Alpha-3 (USA) codes
  • ☎️ International calling codes
  • 💰 Currency details
  • 🎨 Fully customizable UI styles
  • ⚡ Lightweight & fast
  • 📱 Works seamlessly with Expo & React Native

📖 Example Country Data

Each country object contains rich data:

{ 
    name:            "Pakistan", 
    alpha2:          "PK", 
    alpha3:          "PAK", 
    calling_code:    "+92", 
    currency_code:   "PKR", 
    currency_name:   "Pakistani Rupees", 
    symbol:          "₨", 
    emoji:           "🇵🇰"
}

🧩 Components

1️⃣ CountriesList

Displays a searchable list of countries.

import { CountriesList } from "react-native-country-data";

<CountriesList
    pickerButtonOnPress={(item) => {
        setShowModalBottom(false);
        setInputFieldValue(item.alpha2);
    }} 
    searchValue={searchCountry} 
    style={{ 
        buttonStyles: {}, 
        emoji: {}, 
        callingCode: {}, 
        name: {} 
    }}
/>

2️⃣ CountriesPicker

Use this component as a picker or modal dropdown (same API as CountriesList)

import { CountriesPicker } from "react-native-country-data"; 

<CountriesPicker
    pickerButtonOnPress={(item) => {
        setShowModalBottom(false);
        setInputFieldValue(item.alpha2);
    }} 
    searchValue={searchCountry} 
    style={{ 
        container: {}, 
        modal: {}, 
        modalInner: {}, 
        searchBar: {}, 
        message: {}, 
        countryMessage: {}, 
        line: {}, 
        buttonStyles: {}, 
        emoji: {}, 
        callingCode: {}, 
        name: {} 
    }}
/>

🚨 CurrencyList Displays a searchable list of currencies.

<CountriesList
    type="currency"
/>

or

<CountriesPicker
    type="currency"
/>

🔎 Search Country by Alpha-2 Code

Use countriesFilter to retrieve country data instantly.

import { countriesFilter } from "react-native-country-data";

countriesFilter["PK"]?.emoji; // 🇵🇰
countriesFilter["PK"]?.calling_code; // +92
countriesFilter["PK"]?.currency_code; // PKR

This is useful for:

  • Pre-selecting countries
  • Showing flags dynamically
  • Phone number inputs
  • Localization features

🎨 Styling Customization

You can customize the following styles:

  • backdrop
  • modal
  • line
  • searchMessageText
  • itemsList
  • modalInner
  • messageContainer
  • textInput
  • buttonStyles
  • name
  • alpha2
  • alpha3
  • callingCode
  • currencyCode
  • symbol
  • emoji

This allows easy integration with:

  • Tailwind / NativeWind
  • Custom theme systems
  • Inline styles

🛠️ Common Use Cases

  • ✅ Phone number inputs
  • ✅ Country selection screens
  • ✅ Signup & onboarding flows
  • ✅ Payment & billing forms
  • ✅ Localization & internationalization

🤝 Contributing

  • Contributions are welcome!
  • Fork the repository
  • Create a new branch
  • Commit your changes
  • Open a Pull Request

Support

If you find this package useful, please consider giving it a ⭐ on GitHub.It helps the community grow ❤️

📄 License

MIT License ©react-native-country-data