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

expo-intl-phone-number

v0.1.2

Published

A fully customizable, strictly typed, and performant international phone input for React Native (Expo).

Readme

React Native International Phone Input

A fully customizable, strictly typed, and performant international phone input component for React Native (Expo compatible).

Screenshots

Features

  • 📱 Strict TypeScript support.
  • 🏳️ Local Flag Assets (no external image deps).
  • FlashList powered for smooth scrolling.
  • 🎨 Fully Customizable with StyleSheet props.
  • 🧱 Controlled Component pattern.
  • 🔍 Searchable country list.
  • 🪄 Ref API for programmatic control (setCountry, isValid, focus).
  • 🧹 Automatic Formatting via libphonenumber-js.

Installation

npm install expo-intl-phone-number @shopify/flash-list libphonenumber-js
# OR
yarn add expo-intl-phone-number @shopify/flash-list libphonenumber-js

Note: Ensure you have setup expo or react-native environment correctly.

Usage

import { InternationalPhoneInput } from 'expo-intl-phone-number';

// ...

<InternationalPhoneInput
  value={value}
  onChange={(newValue, iso2) => setValue(newValue)}
  defaultCountry="US"
/>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | string | required | The current E.164 formatted value. | | onChange | (value, iso2) => void | required | Callback when text changes. | | defaultCountry | CountryCode | 'TR' | Initial country selection. | | preferredCountries | CountryCode[] | [] | List of countries to show at the top. | | excludedCountries | CountryCode[] | [] | List of countries to remove. | | disabled | boolean | false | Disable interactions. | | placeholder | string | 'Phone Number' | Input placeholder. | | searchPlaceholder | string | 'Search...' | Search input placeholder. | | pickerType | 'dropdown' \| 'modal' | 'dropdown' | Country picker display type. | | modalHeight | number | 300 | Height of the country picker. |

Ref Methods

Use a ref to access imperative methods:

const phoneRef = useRef<InternationalPhoneInputRef>(null);

// Focus the input
phoneRef.current?.focus();

// Check validity
const isValid = phoneRef.current?.isValid();

// Set country programmatically
phoneRef.current?.setCountry('GB');

Customization

You can override almost any style:

  • containerStyle
  • inputStyle
  • flagContainerStyle
  • dropdownStyle
  • searchStyle
  • ...and more.

Testing

This component includes a comprehensive test suite using Jest and React Native Testing Library.

npm test

Ensure your jest.setup.js is configured correctly (included in repo).

Architecture

  • Rendering: Uses @shopify/flash-list for the country dropdown to handle 200+ items efficiently.
  • Parsing: libphonenumber-js handles all validation and formatting.
  • Styling: Pure StyleSheet objects, no heavy CSS-in-JS libraries.

Contributing

Pull requests are welcome.

License

MIT