Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Phone input

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

Public APILumenPhoneInputApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

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.

Phone input rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
@State private var phone = LumenPhoneNumber.empty(
    country: LumenPhoneCountry(
        regionCode: "CO",
        callingCode: "+57",
        displayName: "Colombia"
    )
)

LumenPhoneInput(
    "Hospital or OB phone number",
    value: $phone
)

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

React NativeAndroid / Compose
Apple docsSwiftUI package