【React Native】文件翻譯閱讀紀錄 - APIs - Text Style Props

by - 上午9:00

Facebook Open Source React Native
Text Style Props


Props



參考

Props

textShadowOffset

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

color

TYPEREQUIRED
colorNo

fontSize

TYPEREQUIRED
numberNo

fontStyle

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

fontWeight

指定字體粗細。大多數字體都支持“正常”和“粗體”值。並非所有字體都具有每個數值的變體,在這種情況下,選擇最接近的字體。

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

lineHeight

TYPEREQUIRED
numberNo

textAlign

指定文本對齊。值'justify'僅在iOS上支持,在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

設置為false以刪除旨在為某些上升/下降器騰出空間的額外字體填充。對於某些字體,此填充可以使文本在垂直居中時看起來略微錯位。為獲得最佳效果,還將textAlignVertical設置為居中。默認為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

letterSpacing

TYPEREQUIREDPLATFORM
numberNoiOS

textDecorationColor

TYPEREQUIREDPLATFORM
colorNoiOS

textDecorationStyle

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

textTransform

TYPEREQUIREDPLATFORM
enum('none', 'uppercase', 'lowercase', 'capitalize')NoiOS

writingDirection

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




You May Also Like

0 意見