Skip to main content
Version: Next

Text Style Props

Exampleโ€‹

Reference

Propsโ€‹

colorโ€‹

Type
color

fontFamilyโ€‹

Type
string

The generic font families system-ui, ui-sans-serif, ui-serif, ui-monospace, and ui-rounded are supported on iOS.


fontSizeโ€‹

Type
number

fontStyleโ€‹

Type
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.

TypeDefault
enum('normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900') or number'normal'

includeFontPadding
Android
โ€‹

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.

TypeDefault
booltrue

fontVariantโ€‹

Allows you to set all the font variants for a font. Can be set by using an array of enums or a space-separated string e.g. 'small-caps common-ligatures'.

TypeDefault
array of enum('small-caps', 'oldstyle-nums', 'lining-nums', 'tabular-nums', 'proportional-nums') or string[]

letterSpacingโ€‹

Increase or decrease the spacing between characters. By default there is no extra letter spacing.

Type
number

lineHeightโ€‹

Numeric value that controls the vertical spacing between lines of text within a text element. It specifies the distance between the baselines of consecutive lines of text.

Type
number

textAlignโ€‹

Specifies text alignment. On Android, the value 'justify' is only supported on Oreo (8.0) or above (API level >= 26). The value will fallback to left on lower Android versions.

TypeDefault
enum('auto', 'left', 'right', 'center', 'justify')'auto'

textAlignVertical
Android
โ€‹

TypeDefault
enum('auto', 'top', 'bottom', 'center')'auto'

textDecorationColor
iOS
โ€‹

Type
color

textDecorationLineโ€‹

TypeDefault
enum('none', 'underline', 'line-through', 'underline line-through')'none'

textDecorationStyle
iOS
โ€‹

TypeDefault
enum('solid', 'double', 'dotted', 'dashed')'solid'

textShadowColorโ€‹

Type
color

textShadowOffsetโ€‹

Type
object: {width?: number, height?: number}

textShadowRadiusโ€‹

Type
number

textTransformโ€‹

TypeDefault
enum('none', 'uppercase', 'lowercase', 'capitalize')'none'

verticalAlign
Android
โ€‹

TypeDefault
enum('auto', 'top', 'bottom', 'middle')'auto'

writingDirection
iOS
โ€‹

TypeDefault
enum('auto', 'ltr', 'rtl')'auto'

userSelectโ€‹

It allows the user to select text and to use the native copy and paste functionality. Has precedence over the selectable prop.

TypeDefault
enum('auto', 'text', 'none', 'contain', 'all')none