| Prop | RN <Text> compatible |
Notes |
|---|---|---|
allowFontScaling |
โ | |
children |
๐ก | string only |
ellipsizeMode |
โ | |
maxFontSizeMultiplier |
โ | |
nativeID |
โ | |
id |
โ | |
numberOfLines |
โ | |
onLayout |
โ | |
testID |
โ | |
| Accessibility props | โ | accessible, accessibilityLabel, accessibilityRole, accessibilityState, etc |
RN <Text> compatibility: โ
fully compatible ยท ๐ก partially compatible.
| Style | RN <Text> compatible |
Notes |
|---|---|---|
color |
โ | |
fontFamily |
โ | |
fontSize |
โ | |
fontStyle |
โ | |
fontVariant |
โ | |
fontVariationSettings |
โฌ๏ธ | Not in RN <Text>. Variable-font axes in CSS syntax, e.g. '"wght" 700, "wdth" 87.5'. |
fontWeight |
โ | |
includeFontPadding |
โ | Android-only, like RN <Text> |
letterSpacing |
โ | |
lineHeight |
โ | |
textAlign |
โ | |
textAlignVertical |
โ โฌ๏ธ | Android-only in RN Text. Implemented for both iOS & Android here. |
textDecorationLine |
โ | |
textShadowColor |
โ | |
textShadowOffset |
โ | |
textShadowRadius |
โ | |
textTransform |
โ | |
verticalAlign |
โ โฌ๏ธ | Android-only in RN Text. Implemented for both iOS & Android |
Every other ViewStyle prop |
โ | width, margin, padding, backgroundColor, opacity, etc |
RN <Text> compatibility: โ
fully compatible ยท โฌ๏ธ added in Plain Text
Things Plain Text does that RN <Text> does not:
fontVariationSettings: set variable-font axes in CSS syntax, e.g.
'"wght" 700, "wdth" 87.5'. RN <Text> has no such style. Needs a font with
an fvar table (no system font qualifies) and Android API 26+.verticalAlign and textAlignVertical on iOS: RN <Text> only honors
these on Android. Plain Text implements them on both platforms.lineHeight clipping fix on iOS: with a large lineHeight, iOS TextKit
clips the first line's ascenders and pushes the text down
(RN#29507). Plain
Text corrects the vertical offset at draw time so the text stays centered in
its line box.| Prop / style | RN <Text> compatible |
|---|---|
adjustsFontSizeToFit / minimumFontScale |
To Do |
selectable / selectionColor / suppressHighlighting / userSelect |
To Do |
textDecorationColor / textDecorationStyle |
To Do |
writingDirection |
To Do |
dynamicTypeRamp |
To Do |
android_hyphenationFrequency / textBreakStrategy / lineBreakStrategyIOS |
To Do |
Open an issue for the one you need. Real-world usage sets the priority.
Deliberatly excluded:
<Text> elements and mixed stylesonPress, onLongPress, onPressIn, onPressOut,
pressRetentionOffset, and the touch-responder handlers
(onStartShouldSetResponderCapture, onMoveShouldSetResponder,
onResponderGrant / Move / Release / Terminate,
onResponderTerminationRequest). Wrap <PlainText> in a Pressable instead.disabled: only meaningful alongside press handlers.dataDetectorType: turns substrings into tappable links, which makes the label interactive.onTextLayout