diff --git a/releases/next/docs/text.html b/releases/next/docs/text.html index a1c686859a3..561a28cf95f 100644 --- a/releases/next/docs/text.html +++ b/releases/next/docs/text.html @@ -51,7 +51,8 @@ most fonts. Not all fonts have a variant for each of the numeric values, in that case the closest one is chosen.

lineHeight number
textAlign enum('auto', 'left', 'right', 'center', 'justify')

Specifies text alignment. The value 'justify' is only supported on iOS and fallbacks to left on Android.

textDecorationLine enum('none', 'underline', 'line-through', 'underline line-through')
textShadowColor color
textShadowOffset {width: number, height: number}
textShadowRadius number
androidincludeFontPadding bool

Set to false to remove extra font padding intended to make space for certain ascenders / descenders. With some fonts, this padding can make text look slightly misaligned when centered vertically. -For best results also set textAlignVertical to center. Default is true.

androidtextAlignVertical enum('auto', 'top', 'bottom', 'center')
iosfontVariant [enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')]
iosletterSpacing number
iostextDecorationColor color
iostextDecorationStyle enum('solid', 'double', 'dotted', 'dashed')
ioswritingDirection enum('auto', 'ltr', 'rtl')

testID string #

Used to locate this view in end-to-end tests.

iosadjustsFontSizeToFit bool #

Specifies whether font should be scaled down automatically to fit given style constraints.

iosminimumFontScale number #

Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).

iossuppressHighlighting bool #

When true, no visual change is made when text is pressed down. By +For best results also set textAlignVertical to center. Default is true.

androidtextAlignVertical enum('auto', 'top', 'bottom', 'center')
iosfontVariant [enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')]
iosletterSpacing number
iostextDecorationColor color
iostextDecorationStyle enum('solid', 'double', 'dotted', 'dashed')
ioswritingDirection enum('auto', 'ltr', 'rtl')

testID string #

Used to locate this view in end-to-end tests.

androidtextBreakStrategy enum('simple', 'highQuality', 'balanced') #

Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced +The default value is highQuality.

iosadjustsFontSizeToFit bool #

Specifies whether font should be scaled down automatically to fit given style constraints.

iosminimumFontScale number #

Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0).

iossuppressHighlighting bool #

When true, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.

You can edit the content above on GitHub and send us a pull request!

Description #

Nested Text #

Both iOS and Android allow you to display formatted text by annotating ranges of a string with specific formatting like bold or colored text (NSAttributedString on iOS, SpannableString on Android). In practice, this is very tedious. For React Native, we decided to use web paradigm for this where you can nest text to achieve the same effect.

import React, { Component } from 'react'; import { AppRegistry, Text } from 'react-native'; diff --git a/releases/next/docs/textinput.html b/releases/next/docs/textinput.html index 9b564dc6c40..b192015f570 100644 --- a/releases/next/docs/textinput.html +++ b/releases/next/docs/textinput.html @@ -115,7 +115,8 @@ unwanted edits without flicker.

androidinlineImageLeft string #

If defined, the provided image resource will be rendered on the left.

androidinlineImagePadding number #

Padding between the inline image, if any, and the text input itself.

androidnumberOfLines number #

Sets the number of lines for a TextInput. Use it with multiline set to -true to be able to fill the lines.

androidreturnKeyLabel string #

Sets the return key to the label. Use it instead of returnKeyType.

androidunderlineColorAndroid color #

The color of the TextInput underline.

iosclearButtonMode enum('never', 'while-editing', 'unless-editing', 'always') #

When the clear button should appear on the right side of the text view.

iosclearTextOnFocus bool #

If true, clears the text field automatically when editing begins.

iosdataDetectorTypes enum('phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'), [object Object] #

Determines the types of data converted to clickable URLs in the text input. +true to be able to fill the lines.

androidreturnKeyLabel string #

Sets the return key to the label. Use it instead of returnKeyType.

androidtextBreakStrategy enum('simple', 'highQuality', 'balanced') #

Set text break strategy on Android API Level 23+, possible values are simple, highQuality, balanced +The default value is simple.

androidunderlineColorAndroid color #

The color of the TextInput underline.

iosclearButtonMode enum('never', 'while-editing', 'unless-editing', 'always') #

When the clear button should appear on the right side of the text view.

iosclearTextOnFocus bool #

If true, clears the text field automatically when editing begins.

iosdataDetectorTypes enum('phoneNumber', 'link', 'address', 'calendarEvent', 'none', 'all'), [object Object] #

Determines 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'

iosenablesReturnKeyAutomatically bool #

If 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.

ioskeyboardAppearance enum('default', 'light', 'dark') #

Determines the color of the keyboard.

iosonKeyPress function #

Callback that is called when a key is pressed.