Skip to content

feat(renderer): add secureTextEntry to TextInput - #953

Open
grgmgd wants to merge 1 commit into
margelo:mainfrom
grgmgd:feat/text-input-secure-text-entry
Open

grgmgd wants to merge 1 commit into
margelo:mainfrom
grgmgd:feat/text-input-secure-text-entry

Conversation

@grgmgd

@grgmgd grgmgd commented Dec 2, 2026

Copy link
Copy Markdown

Password fields currently show their text. This adds secureTextEntry, matching the React Native prop name.

  • iOS sets isSecureTextEntry on the single-line UITextField, which also enables password autofill and turns off suggestions.
  • Android switches the EditText to the password input variation. Changing the input type makes EditText reapply its text and switch to a monospace typeface, so NativeTextInputView.replaceInputType keeps the text, selection and typeface and skips the edit callback.
  • Multiline inputs ignore the prop on both platforms, since UITextView has no secure entry.

The example's Text Input screen has a password field with a Show/Hide toggle. Tested with it on an iOS 27.2 simulator and an Android API 37 emulator: typed text is obscured, and toggling keeps the text and caret. As in other iOS apps, typing into a field that was just obscured again replaces its text.

Obscures typed characters for password fields and enables the platform's password autofill. iOS sets isSecureTextEntry on the single-line UITextField. Android switches the EditText to the password variation while keeping its text, selection and typeface. Multiline inputs ignore the prop on both platforms.
@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

@grgmgd is attempting to deploy a commit to the Margelo Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant