1.8.33 • Published 2 years ago

npm-quality-score-test v1.8.33

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-international-phone

šŸ¤™ International phone input component for React

npm-version build-status-badge install-size-badge codecov downloads

Live demo: Storybook

demo-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.
  • ✨ 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

$ npm i react-international-phone

Basic usage

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
        initialCountry="ua"
        value={phone}
        onChange={(phone) => setPhone(phone)}
      />
    </div>
  );
};

Documentation

Find the full API reference on official documentation.

2.0.0-rc.1

2 years ago

1.8.32

2 years ago

1.8.33

2 years ago

1.8.20

2 years ago

1.8.21

2 years ago

1.8.22

2 years ago

1.8.23

2 years ago

1.8.24

2 years ago

1.8.25

2 years ago

1.8.26

2 years ago

1.8.27

2 years ago

1.8.28

2 years ago

1.8.29

2 years ago

1.8.30

2 years ago

1.8.31

2 years ago

1.8.14

2 years ago

1.8.15

2 years ago

1.8.16

2 years ago

1.8.17

2 years ago

1.8.18

2 years ago

1.8.19

2 years ago

1.8.13

2 years ago

1.8.12

2 years ago

1.8.11

2 years ago

1.8.10

2 years ago

1.8.9

2 years ago

1.8.8

2 years ago

1.8.7

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.2

2 years ago

1.8.1

2 years ago

1.7.4

2 years ago

1.7.3

2 years ago

1.7.2

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago