Forms

Phone Input

Text inputs enable seamless data entry and editing, offering clear, interactive fields for a more efficient and user-friendly experience.

AA

WCAG 2.1 accessibility compliant

Default

Label

86

Placeholder text

Supplementary information

Populated

Label

86

16675520527

Supplementary information

Active

Label

86

Supplementary information

Active / User typing

Label

86

User typing

Supplementary information

Error

Label

86

16675520527

Supplementary information

Disabled

86

Supplementary information

React Native



<SafeAreaView style={{ flex: 1 }}>
      <ScrollView
        contentContainerStyle={{
          flexGrow: 1,
          justifyContent: 'center',
          alignItems: 'center',
          padding: 24,
        }}
      >
        <View style={{ width: '100%', maxWidth: 343 }}>
          {/* Phone Input Section */}
          <Label
  style={{
    fontFamily: 'Inter-SemiBold',
    paddingBottom: 8,
    paddingLeft: 2,
  }}
  nativeID='phoneLabel'
  accessibilityRole='text'
>
  Phone number
</Label>
<PhoneInput
  placeholder="Enter phone number"
  error={phoneErr || undefined}
  value={phoneNumber}
  onChangeText={handlePhoneChange}
  countryCode={countryCode}
  onChangeCountryCode={handleCountryCodeChange}
  onSubmitEditing={validatePhone}
  accessibilityLabel="Phone number input"
  accessibilityHint="Enter your phone number with country code"
  accessibilityRole="textbox"
  accessibilityLabelledBy="phoneLabel"
  accessibilityState={{
    disabled: false,
    required: true, // Assuming this field is required
    invalid: !!phoneErr
  }}
  accessibilityElementsHidden={false}
  importantForAccessibility="yes"
  aria-errormessage="phoneErrorMessage"
/>
{phoneErr && (
  <View 
    nativeID="phoneErrorMessage"
    accessibilityRole="alert"
    accessibilityLiveRegion="assertive"
    style={{ marginTop: 4 }}
  >
    <Text style={{ color: 'red', fontFamily: 'Inter' }}>{phoneErr}</Text>
  </View>
)}
        </View>
      </ScrollView>
    </SafeAreaView>

WCAG 2.1 accessibility checks

1.3.1 Info and Relationships (Level A)

1.4.3 Contrast (Minimum) (Level AA)

2.4.6 Headings and Labels (Level AA)

4.1.2 Name, Role, Value (Level A)

4.1.3 Status Messages (Level AA)

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.