[ios][ui] Add textContentType modifier#44548
Merged
intergalacticspacehighway merged 1 commit intoexpo:mainfrom Apr 7, 2026
Merged
[ios][ui] Add textContentType modifier#44548intergalacticspacehighway merged 1 commit intoexpo:mainfrom
intergalacticspacehighway merged 1 commit intoexpo:mainfrom
Conversation
bb2cd5f to
cd8d07d
Compare
Contributor
|
Subscribed to pull request
Generated by CodeMention |
intergalacticspacehighway
approved these changes
Apr 7, 2026
Contributor
intergalacticspacehighway
left a comment
There was a problem hiding this comment.
Sick! Thanks!
Contributor
|
Will require conflict resolution as i just merged the previous PR 😅 |
cd8d07d to
0fcc415
Compare
Contributor
Author
😂 sorry. rebased and pushed. @intergalacticspacehighway |
intergalacticspacehighway
approved these changes
Apr 7, 2026
intergalacticspacehighway
pushed a commit
that referenced
this pull request
Apr 7, 2026
Add `textContentType` modifier for setting the semantic meaning of text input areas. Wraps SwiftUI's [`textContentType(_:)`](https://developer.apple.com/documentation/swiftui/view/textcontenttype(_:)-ufdv) (iOS 13+), mapping to all 45 [`UITextContentType`](https://developer.apple.com/documentation/uikit/uitextcontenttype) values. Enables iOS autofill for passwords, emails, addresses, credit cards, OTP codes, and more. ```tsx import { textContentType } from "@expo/ui/swift-ui/modifiers"; <TextField placeholder="Username" modifiers={[textContentType("username")]} /> <SecureField placeholder="Password" modifiers={[textContentType("password")]} /> ``` Without this modifier, text fields cannot participate in the iOS keychain autofill system. Values introduced in iOS 17+ (`creditCardExpiration`, `birthdate`, etc.) and iOS 17.4+ (`cellularEID`, `cellularIMEI`) include `#available` guards with sensible fallbacks. # Test Plan - `yarn build` in `packages/expo-ui`: clean - `yarn lint --fix` in `packages/expo-ui`: clean - `yarn lint` in `packages/expo-ui`: clean - `yarn test` in `packages/expo-ui`: 42/42 passing - Regenerated docs API data with `et generate-docs-api-data -p expo-ui` - Applied `.username` to TextField and `.password` to SecureField in bare-expo, verified iOS password autofill suggestion appears above keyboard
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
textContentTypemodifier for setting the semantic meaning of text input areas. Wraps SwiftUI'stextContentType(_:)(iOS 13+), mapping to all 45UITextContentTypevalues.Enables iOS autofill for passwords, emails, addresses, credit cards, OTP codes, and more.
Without this modifier, text fields cannot participate in the iOS keychain autofill system. Values introduced in iOS 17+ (
creditCardExpiration,birthdate, etc.) and iOS 17.4+ (cellularEID,cellularIMEI) include#availableguards with sensible fallbacks.Test Plan
yarn buildinpackages/expo-ui: cleanyarn lint --fixinpackages/expo-ui: cleanyarn lintinpackages/expo-ui: cleanyarn testinpackages/expo-ui: 42/42 passinget generate-docs-api-data -p expo-ui.usernameto TextField and.passwordto SecureField in bare-expo, verified iOS password autofill suggestion appears above keyboard