Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
FormsReact Native

Phone input

Enter an international phone number with searchable countries, calling codes, formatting, validation, and E.164 output.

Public APILumenPhoneInputReact Native

Native example

Use Phone input

Use for international phone entry that needs discoverable country selection and a validated E.164 result. Persist or dial e164 only when isValid is true.

View verified React Native runtime capture
Phone input rendered in the Expo web renderer Lumen playground
Verified runtime captureExpo web renderer
tsx
const colombia = getLumenPhoneCountry('CO', { locale: 'en-US' })
if (!colombia) throw new Error('Missing Colombia metadata')

const [phone, setPhone] = useState(() =>
  createEmptyLumenPhoneNumber(colombia)
)

<LumenPhoneInput
  label="Hospital or OB phone number"
  value={phone}
  onValueChange={setPhone}
/>

Reference

Public API

The primary shared and platform-specific options exposed by LumenPhoneInput.

APIValues or typeDefaultDescription
value / onValueChangeLumenPhoneNumber / callbackRequiredControls the country, editable national number, validity, and normalized E.164 result.
countriesPlatform country collectionGenerated metadataPopulates the searchable country picker.
localePlatform localeCurrent localeLocalizes generated country names and international paste resolution.
description / errorMessageString?nullProvides supporting text or an application-owned validation message.
invalidNumberMessageStringEnter a complete phone number.Localizes metadata-backed invalid-number feedback.
showValidationErrorBooleantrueLets the application defer invalid-number feedback until its chosen interaction boundary.
enabled / requiredBooleantrue / falseControls native disabled and required presentation.

Native behavior

Design and accessibility

When to use it

Use for international phone entry that needs discoverable country selection and a validated E.164 result. Persist or dial e164 only when isValid is true.

Accessibility

The country selector announces the localized country name and calling code. Flags supplement visible text and are never the only country identifier.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose
React Native docsNative primitives