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 demos yourself, follow the instructions in the Demo section of the readme. Typescript type definitions included.
Demo
Code
import IntlTelInput from 'intl-tel-input/react';
<IntlTelInput
initialValue={value}
onChangeNumber={setNumber}
onChangeValidity={setIsValid}
onChangeErrorCode={setErrorCode}
// any initialisation options from the readme will work here
initOptions={{
initialCountry: "us",
loadUtils: () => import("/intl-tel-input/js/utils.js?1769266488485"),
}}
/>