Skip to main content

Getting Started

Welcome to react-phonebox – a lightweight, customizable and i18n-ready phone input component for React.

✨ Features

  • Built-in country selector with flags and dialing codes
  • Locale-based country names (supports en, tr, fr, etc.)
  • Custom formatting using libphonenumber-js
  • Validity check for mobile-only numbers
  • TypeScript support
  • Modular architecture (UI or Logic only)

📦 Installation

npm install react-phonebox
# or
yarn add react-phonebox

🔌 Peer Dependencies

Ensure you have these installed in your project:

  • react >=17
  • react-dom >=17
  • libphonenumber-js
npm install react react-dom libphonenumber-js

Now you're ready to use PhoneBox or PhoneBoxInput!

➡️ Head over to the Usage section to learn more.