1.8.33 ā€¢ Published 8 months ago

npm-quality-score-test v1.8.33

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months 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

8 months ago

1.8.32

8 months ago

1.8.33

8 months ago

1.8.20

9 months ago

1.8.21

9 months ago

1.8.22

9 months ago

1.8.23

9 months ago

1.8.24

9 months ago

1.8.25

9 months ago

1.8.26

9 months ago

1.8.27

9 months ago

1.8.28

9 months ago

1.8.29

9 months ago

1.8.30

9 months ago

1.8.31

9 months ago

1.8.14

9 months ago

1.8.15

9 months ago

1.8.16

9 months ago

1.8.17

9 months ago

1.8.18

9 months ago

1.8.19

9 months ago

1.8.13

1 year ago

1.8.12

1 year ago

1.8.11

1 year ago

1.8.10

1 year ago

1.8.9

1 year ago

1.8.8

1 year ago

1.8.7

1 year ago

1.8.6

1 year ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.2

1 year ago

1.8.1

1 year ago

1.7.4

1 year ago

1.7.3

1 year ago

1.7.2

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago