W3cubDocs

/React Native

TextStylePropTypes

Props

color?: color

fontFamily?: string

fontSize?: number

fontStyle?: enum('normal', 'italic')

fontWeight?: enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')

Specifies font weight. The values 'normal' and 'bold' are supported for 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')

© 2015–2017 Facebook Inc.
Licensed under the Creative Commons Attribution 4.0 International Public License.
https://facebook.github.io/react-native/docs/textstyleproptypes.html