Skip to main content

Phone API

return formatted phone number.

It uses awesome-phonenumber under the hood.

added in 1.5.0

Import​

import Phone from "@tlgr/fmt/react/phone";
// or
import { Phone } from "@tlgr/fmt/react";

Props​

NameTypeDefaultDescription
phonestring/numberphone number
formatstringphone number format
regionCodestringRegion code for the phone number (only required if phoneNumber is on a national format). Example: 'SE' for Sweden, 'CH' for Switzerland, etc.