Skip to main content
Version: 0.63

Text Style Props

Exampleโ€‹

Reference

Propsโ€‹

textShadowOffsetโ€‹

TypeRequired
object: {width: number,height: number}No

colorโ€‹

TypeRequired
colorNo

fontSizeโ€‹

TypeRequired
numberNo

fontStyleโ€‹

TypeRequired
enum('normal', 'italic')No

fontWeightโ€‹

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.

TypeRequired
enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')No

lineHeightโ€‹

TypeRequired
numberNo

textAlignโ€‹

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

TypeRequired
enum('auto', 'left', 'right', 'center', 'justify')No

textDecorationLineโ€‹

TypeRequired
enum('none', 'underline', 'line-through', 'underline line-through')No

textShadowColorโ€‹

TypeRequired
colorNo

fontFamilyโ€‹

TypeRequired
stringNo

textShadowRadiusโ€‹

TypeRequired
numberNo

includeFontPaddingโ€‹

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.

TypeRequiredPlatform
boolNoAndroid

textAlignVerticalโ€‹

TypeRequiredPlatform
enum('auto', 'top', 'bottom', 'center')NoAndroid

fontVariantโ€‹

TypeRequiredPlatform
array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')NoiOS, Android >= 5.0

letterSpacingโ€‹

TypeRequiredPlatform
numberNoiOS, Android >= 5.0

textDecorationColorโ€‹

TypeRequiredPlatform
colorNoiOS

textDecorationStyleโ€‹

TypeRequiredPlatform
enum('solid', 'double', 'dotted', 'dashed')NoiOS

textTransformโ€‹

TypeRequired
enum('none', 'uppercase', 'lowercase', 'capitalize')No

writingDirectionโ€‹

TypeRequiredPlatform
enum('auto', 'ltr', 'rtl')NoiOS