Optional
clearenum('never', 'while-editing', 'unless-editing', 'always') When the clear button should appear on the right side of the text view
Optional
clearIf true, clears the text field automatically when editing begins
Optional
dataDetermines the types of data converted to clickable URLs in the text input.
Only valid if multiline={true}
and editable={false}
.
By default no data types are detected.
You can provide one type or an array of many types.
Possible values for dataDetectorTypes
are:
'phoneNumber'
'link'
'address'
'calendarEvent'
'none'
'all'
Optional
enablesIf true, the keyboard disables the return key when there is no text and automatically enables it when there is text. The default value is false.
Optional
keyboardDetermines the color of the keyboard.
Optional
lineSet line break strategy on iOS.
Optional
passwordProvide rules for your password. For example, say you want to require a password with at least eight characters consisting of a mix of uppercase and lowercase letters, at least one number, and at most two consecutive characters. "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8;"
Optional
rejectIf true
, allows TextInput to pass touch events to the parent component.
This allows components to be swipeable from the TextInput on iOS,
as is the case on Android by default.
If false
, TextInput always asks to handle the input (except when disabled).
Optional
scrollIf false, scrolling of the text view will be disabled. The default value is true. Only works with multiline={true}
Optional
selectionSee DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document
Optional
smartIf false
, the iOS system will not insert an extra space after a paste operation
neither delete one or two spaces after a cut or delete operation.
The default value is true
.
Optional
spellIf false, disables spell-check style (i.e. red underlines). The default value is inherited from autoCorrect
Optional
textGive the keyboard and the system information about the expected semantic meaning for the content that users enter.
To disable autofill, set textContentType to none
.
Possible values for textContentType
are:
'none'
'URL'
'addressCity'
'addressCityAndState'
'addressState'
'countryName'
'creditCardNumber'
'creditCardExpiration'
(iOS 17+)'creditCardExpirationMonth'
(iOS 17+)'creditCardExpirationYear'
(iOS 17+)'creditCardSecurityCode'
(iOS 17+)'creditCardType'
(iOS 17+)'creditCardName'
(iOS 17+)'creditCardGivenName'
(iOS 17+)'creditCardMiddleName'
(iOS 17+)'creditCardFamilyName'
(iOS 17+)'emailAddress'
'familyName'
'fullStreetAddress'
'givenName'
'jobTitle'
'location'
'middleName'
'name'
'namePrefix'
'nameSuffix'
'nickname'
'organizationName'
'postalCode'
'streetAddressLine1'
'streetAddressLine2'
'sublocality'
'telephoneNumber'
'username'
'password'
'newPassword'
'oneTimeCode'
'birthdate'
(iOS 17+)'birthdateDay'
(iOS 17+)'birthdateMonth'
(iOS 17+)'birthdateYear'
(iOS 17+)
IOS Specific properties for TextInput
See
https://reactnative.dev/docs/textinput#props