2

How do I create a phone number in my app that I can click on so that it opens directly in my phone and I can then call it?

isherwood
  • 58,414
  • 16
  • 114
  • 157
  • 2
    Does this answer your question? [How do I hyperlink a phone number?](https://stackoverflow.com/questions/53270766/how-do-i-hyperlink-a-phone-number) – isherwood Aug 10 '22 at 12:06
  • 1
    This question has nothing to do with React. – isherwood Aug 10 '22 at 12:07
  • I want an answer that has something to do with React? One that was given to me elsewhere, to use Link from React Router Dom. –  Aug 10 '22 at 13:36

2 Answers2

3

You can use the anchor element in this way:

<a href="tel:555-555-5555"><img src="path/to/phone/icon.jpg" alt="Call 555-555-5555" /></a>

most modern browsers support this.

Duplicate of this: How to trigger a phone call when clicking a link in a web page on mobile phone

Talha Fayyaz
  • 481
  • 2
  • 9
  • Answers should not be reposted. Please flag the question as a duplicate or make a comment to that effect. – isherwood Aug 10 '22 at 12:08
  • @isherwood uh, I was looking for an answer using React, why change the name and tags for my post? Now that I've talked with a friend of mine they suggested I use Link from React router dom. –  Aug 10 '22 at 13:32
0

you can implant it same as you did in html!

<a href="tel:PHONE"> Call! </a>