Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

242
Views
Twillio Script tags in React component

Im trying to use the Twilio script tag for an international country list dropdown and I am following this twillio guide to do so. However, I got to a point where it is showing a step where I have to include a script in the html file( for me it is index.html which is react's root file) and use the element from the window object.

Here is the snippet in the guide: enter image description here

The issue here is that this guide was made with regular html,css, and javascript in mind and not with React/JSX files in mind. Is there any way I can handle this in a react file? Here is the doc in case you guys need to take a look. Thanks!

https://www.twilio.com/blog/international-phone-number-input-html-javascript

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Twilio developer evangelist here.

The intl-tel-input project was initially built for jQuery, though no longer depends on it. So it wasn't really written for React, though it might be possible to integrate it with some work.

However, there is a project that has reimplemented the intl-tel-input in React, it's called react-intl-tel-input and might be the thing you are looking for.

You can install it with

npm install react-intl-tel-input

And use it in your React project by importing the component and its CSS:

import IntlTelInput from 'react-intl-tel-input';
import 'react-intl-tel-input/dist/main.css';

Then using the <IntlTelInput> component:

<IntlTelInput
  containerClassName="intl-tel-input"
  inputClassName="form-control"
/>

See the npm project page for more details.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!