AurumPhoneNumberInput

A phone-number-specific text field: country code + divider + digit input.

familyFields
platformiOS 17+ · SwiftUI
figmacomponent master ↗
sourceSources/Aurum/Component/Field/AurumPhoneNumberInput.swift
code connectFigmaConnect/Sources/AurumFigmaConnect/AurumPhoneNumberInput.figma.swift
snapshots1 baselines · iPhone 17 Pro · iOS 26.5

A phone-number-specific text field: country code + divider + digit input. The SwiftUI port of aurum-android's AurumPhoneNumberInput.

Delegates to AurumTextField with a fixed leading slot that renders an optional flag view, the countryCode text, and a thin vertical divider. Defaults to a phone keyboard and a 10-digit max length; input is silently filtered to digits only.

Intended use

Use whenever capturing a phone number that needs an E.164-style country prefix — login, KYC, recipient details. The leading country-code slot is always visible so users see the dialing context even before typing. For bare numeric capture without country context, use AurumTextField with a numeric keyboard.

Do

  • Default countryCode: "+91" for India-first surfaces; pass an explicit value for international flows.
  • Pair with a country picker that updates countryCode + flag together — never let one drift from the other.
  • Use the errorText channel for "phone already registered" / "invalid number" feedback — consistent with AurumTextField.

Don’t

  • Bypass the country code — bare digit input loses E.164 context downstream and creates locale ambiguity.
  • Pre-format the value with spaces / hyphens; the field stores raw digits and formatting belongs in display only.
  • Use this for OTP — the dedicated OTP input is the right primitive for numeric one-time codes.

Snapshots

Recorded on the pinned simulator — iPhone 17 Pro · iOS 26.5 · Xcode 26.6.

AurumPhoneNumberInput — FieldSnapshotTests · testPhoneNumberInput
FieldSnapshotTests · testPhoneNumberInput

Code Connect

Mapped to Figma node 4904:2455 ↗ — SwiftUI snippets appear in Dev Mode for the latest release.