Skip to content

Phone Display

Free

Shows a stored phone number the way its country writes it: the short form at home and the full form abroad. It can add a call link, a flag, and an extension.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Pass the stored number. Put a PhoneDisplayEmpty inside for a contact with no number.

team-phones.tsx

PhoneDisplay

<a>
PropTypeDefaultDescription
valueRequiredstring | null—The stored number, E.164 ("+14155550132"). An extension may follow (";ext=204" or " ext. 204"). A text that is not a possible number shows as given, with no link and no flag.
phoneFormat"auto""international""national"—auto (default): the national format when the number's country is the region of the locale ("(415) 555-0132" for an en-US reader), else the international one ("+44 20 7946 0958").
flagboolean—Show the country flag before the number. Default false; the flags load in their own chunk.
extensionstring—An extension to add ("204"). Wins over one in value.
localestring—The BCP 47 tag that picks the home region of auto. Default: the DisplayLocaleProvider locale, else "en-US".
metadataMetadataJson—libphonenumber-js metadata, as the Phone Field takes it. Default: the min set.
childrenReactNode—A PhoneDisplayEmpty part: the words of no value. With a value, they are not drawn.
labelsPartial<{ extension: string; }>—The words (PHONE_DISPLAY_LABELS), to translate them. Keep the object stable.
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<a> attributes—Every other attribute goes to the <a>, with a ref.

PhoneDisplayEmpty

<div>
PropTypeDefaultDescription
data-slotstring—The data-slot of the root: the item's own slot ("time-ago"). Default "empty-value".
From Base UIUseRenderBase UI docs
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Store numbers in E.164 (+14155550132) and pass them as value.
  • Use link for a tel: link that a phone can dial.
  • Use flag to show the country flag before the number.
TabWith link, moves to the number.
EnterWith link, opens the tel: link.

The number sits in a bdi with dir="ltr", so the digit groups never flip in right-to-left text.

The flag is decorative. The country code says the country.

The link has a 44px touch target.

Built with

Installs with Phone Display

Components
Country Flag
  1. AddedPhone Display, with Country Flag.
Open the release