メインコンテンツにスキップ

テキストスタイルプロップ

リファレンス

プロップ

color

タイプ
color

fontFamily

タイプ
string(文字列)

fontSize

タイプ
number(数値)

fontStyle

タイプ
enum('normal', 'italic') (列挙型)

fontWeight

フォントの太さを指定します。 'normal''bold' の値は、ほとんどのフォントでサポートされています。すべてのフォントが各数値の変種を持っているわけではなく、その場合は最も近いものが選択されます。

タイプデフォルト
enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') or number(数値)'normal'

includeFontPadding
Android

特定のアセンダー/ディセンダーのためのスペースを作るための追加のフォントパディングを削除するには、false に設定します。一部のフォントでは、このパディングにより、テキストを垂直方向に中央揃えしたときにわずかにずれて見える場合があります。最良の結果を得るには、textAlignVerticalcenter に設定します。

タイプデフォルト
bool(真偽値)true

fontVariant

フォントのすべてのバリアントを設定できます。列挙型の配列またはスペース区切りの文字列(例:'small-caps common-ligatures')を使用して設定できます。

タイプデフォルト
array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') or string(文字列)[]

letterSpacing

文字間の間隔を増減します。デフォルトでは、文字間隔は追加されません。

タイプ
number(数値)

lineHeight

テキスト要素内のテキスト行間の垂直方向の間隔を制御する数値。連続するテキスト行のベースライン間の距離を指定します。

タイプ
number(数値)

textAlign

テキストの配置を指定します。Android では、値 'justify' は Oreo (8.0) 以降 (API レベル >= 26) でのみサポートされています。この値は、Android の下位バージョンでは left にフォールバックします。

タイプデフォルト
enum('auto', 'left', 'right', 'center', 'justify')'auto'

textAlignVertical (テキストの垂直方向の配置)
Android

タイプデフォルト
enum('auto', 'top', 'bottom', 'center')'auto'

textDecorationColor (テキスト装飾の色)
iOS

タイプ
color

textDecorationLine

タイプデフォルト
enum('none', 'underline', 'line-through', 'underline line-through')'none'

textDecorationStyle (テキスト装飾のスタイル)
iOS

タイプデフォルト
enum('solid', 'double', 'dotted', 'dashed')'solid'

textShadowColor

タイプ
color

textShadowOffset

タイプ
object: {width?: number, height?: number} (オブジェクト)

textShadowRadius

タイプ
number(数値)

textTransform

タイプデフォルト
enum('none', 'uppercase', 'lowercase', 'capitalize')'none'

verticalAlign (垂直方向の配置)
Android

タイプデフォルト
enum('auto', 'top', 'bottom', 'middle')'auto'

writingDirection (書き方向)
iOS

タイプデフォルト
enum('auto', 'ltr', 'rtl')'auto'

userSelect

ユーザーがテキストを選択し、ネイティブのコピーアンドペースト機能を使用できるようにします。 selectable プロパティよりも優先されます。

タイプデフォルト
enum('auto', 'text', 'none', 'contain', 'all')none