# react-international-phone

> ☎️ International phone input component for React

Latest version **4.8.0** (published 2026-02-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-international-phone
pnpm add react-international-phone
yarn add react-international-phone
bun add react-international-phone
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.8.0 |
| Published | 2026-02-21 |
| First published | 2022-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 104.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 452 |
| Author | Yurii Brusentsov |
| Maintainers | goveo |
| Keywords | react, phone, input, international, format, number, tel, telephone, react-component, phone-input, react-phone, react-international-phone |

## Links

- npm: https://www.npmjs.com/package/react-international-phone
- Repository: https://github.com/ybrusentsov/react-international-phone
- Homepage: https://react-international-phone-docs.vercel.app/
- Issues: https://github.com/ybrusentsov/react-international-phone/issues
- npm.io page: https://npm.io/package/react-international-phone

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 4.8.0 (latest) — 2026-02-21
- 4.7.0 — 2026-01-19
- 4.6.1 — 2025-11-27
- 4.6.0 — 2025-07-13
- 4.5.0 — 2025-01-18
- 4.4.0 — 2024-12-16
- 4.3.0 — 2024-05-18
- 4.2.9 — 2024-04-29
- 4.2.8 — 2024-04-20
- 4.2.7 — 2024-04-15
- 4.2.6 — 2024-02-22
- 4.2.5 — 2024-02-12
- 4.2.4 — 2024-02-04
- 4.2.3 — 2024-02-03
- 4.2.2 — 2024-01-29
- … 54 more at https://npm.io/package/react-international-phone/versions

## README

# react-international-phone

🤙 International phone input component for React

![npm-version](https://img.shields.io/npm/v/react-international-phone)
![build-status-badge](https://img.shields.io/github/actions/workflow/status/ybrusentsov/react-international-phone/release.yml?branch=master)
![install-size-badge](https://badgen.net/packagephobia/install/react-international-phone)
[![codecov](https://codecov.io/gh/ybrusentsov/react-international-phone/branch/master/graph/badge.svg?token=SHEF4U216O)](https://codecov.io/gh/ybrusentsov/react-international-phone)
![downloads](https://img.shields.io/npm/dt/react-international-phone)
![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)
[![stars](https://img.shields.io/github/stars/ybrusentsov/react-international-phone?style=social)](https://github.com/ybrusentsov/react-international-phone)

[Live demo: Storybook](https://react-international-phone-storybook.vercel.app)

![demo-gif](https://user-images.githubusercontent.com/25800848/215350455-0d362e64-d621-4856-a384-ab18d4a0d5fa.gif)

## Features

- 😎 **Easy to integrate** - Just import and use, no need for the initial setup. Integrate with any UI library using a headless hook.
- 🔍 **Country guessing** - Just start typing and the component will guess the country and format the phone. Country flags are rendered using [Twemoji](https://twemoji.twitter.com/).
- ✨ **Lightweight** - Low bundle size, no third-party dependencies.
- 🌈 **Easy to customize** - Customize styles and component behavior using props.
- ⌨ **Caret position handling** - Typing in the middle of the input, selection and deletion feels naturally.
- ✔️ **Validation** - Easily validate entered phone numbers using provided functions.

## Installation

```sh
$ npm i react-international-phone
```

## Basic usage

```tsx
import { useState } from 'react';
import { PhoneInput } from 'react-international-phone';
import 'react-international-phone/style.css';

const App = () => {
  const [phone, setPhone] = useState('');

  return (
    <div>
      <PhoneInput
        defaultCountry="ua"
        value={phone}
        onChange={(phone) => setPhone(phone)}
      />
    </div>
  );
};
```

## Documentation

Find the full API reference on [official documentation](https://react-international-phone-docs.vercel.app/).

## Migration

You can encounter some breaking changes after update between major versions.

Checkout migration documents that contain a list of breaking changes and ways to migrate:
<br/>
[Update from v3 to v4](https://react-international-phone-docs.vercel.app/docs/Migrations/migrate-to-v4)
<br/>
[Update from v2 to v3](https://react-international-phone-docs.vercel.app/docs/Migrations/migrate-to-v3)
<br/>
[Update from v1 to v2](https://react-international-phone-docs.vercel.app/docs/Migrations/migrate-to-v2)

---
_Source: https://npm.io/package/react-international-phone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
