Q群 567530369,小伙伴们都在这里等你哦~

Text样式属性

Props


文档

Props

textShadowOffset

类型必填
object: {width: number,height: number}

color

类型必填
color

fontSize

类型必填
number

fontStyle

类型必填
enum('normal', 'italic')

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.

类型必填
enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')

lineHeight

类型必填
number

textAlign

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

类型必填
enum('auto', 'left', 'right', 'center', 'justify')

textDecorationLine

类型必填
enum('none', 'underline', 'line-through', 'underline line-through')

textShadowColor

类型必填
color

fontFamily

类型必填
string

textShadowRadius

类型必填
number

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.

类型必填平台
boolAndroid

textAlignVertical

类型必填平台
enum('auto', 'top', 'bottom', 'center')Android

fontVariant

类型必填平台
array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums')iOS

letterSpacing

类型必填平台
numberiOS

textDecorationColor

类型必填平台
coloriOS

textDecorationStyle

类型必填平台
enum('solid', 'double', 'dotted', 'dashed')iOS

textTransform

类型必填
enum('none', 'uppercase', 'lowercase', 'capitalize')No

writingDirection

类型必填平台
enum('auto', 'ltr', 'rtl')iOS