React component

We now have our own React component! Play with it on Storybook! You can view a full list of all supported props here. See ValidationApp for a demo of how to use the validation props. To run the demo yourself, just download the project and then open react/demo/validation.html in your browser. Feedback welcome!

Demo

Code

import IntlTelInput from 'intl-tel-input/react/build/IntlTelInput.esm';

<IntlTelInput
  initialValue={value}
  onChangeNumber={setNumber}
  onChangeValidity={setIsValid}
  onChangeErrorCode={setErrorCode}
  // any initialisation options from the readme will work here
  initOptions={{
    initialCountry: "us",
    utilsScript: "/intl-tel-input/js/utils.js?1708969428263",
  }}
/>