Props and styles
Supported props
RN <Text> compatibility: โ
fully compatible ยท ๐ก partially compatible ยท โฌ๏ธ added in Plain Text.
Supported styles
RN <Text> compatibility: โ
fully compatible ยท โฌ๏ธ added in Plain Text
Notes
textDecorationLine: 'underline'position on iOS: PlainText'sUILabeldraws the underline at the font'sunderlinePosition. RN<Text>draws it a bit too high, shifted up about oneunderlineThicknessabove its natural position.
Improvements over RN 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 anfvartable (no system font qualifies) and Android API 26+.verticalAlignandtextAlignVerticalon iOS: RN<Text>only honors these on Android. Plain Text implements them on both platforms.lineHeightclipping fix on iOS: with a largelineHeight, 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.hyphensprop: hyphenation control. RN<Text>has no iOS hyphenation control at all, and no cross-platform one on either platform.'none'(default) keeps hyphenation at the platform's own default behavior on both iOS and Android โ it never strips or otherwise touches an inserted soft hyphen (ยญ).'auto'turns on dictionary-based hyphenation: iOS'susesDefaultHyphenation(pair withlangto pick the dictionary), and Android'sLayout.HYPHENATION_FREQUENCY_FULL(PlainTextView.kt). On Android,hyphenstakes priority overandroid_hyphenationFrequencywhenever the app sets it at all โ including'none'โ andandroid_hyphenationFrequencyonly applies as a fallback whenhyphensis left unset entirely. Known gap: this distinction only exists at the mounted view; the off-screen pass used to measure/wrap the text can't tell "unset" apart from "explicitly'none'" (both collapse to the same default before they reach native code), so it always falls back toandroid_hyphenationFrequencyregardless. Forhyphens="none"combined with a non-defaultandroid_hyphenationFrequency, this means the measured size can assume that frequency while the rendered text usesNONE.
Planned
Open an issue for the one you need. Real-world usage sets the priority.
Not supported
Deliberately excluded:
- nested
<Text>elements and mixed styles - press and touch handling:
onPress,onLongPress,onPressIn,onPressOut,pressRetentionOffset, and the touch-responder handlers (onStartShouldSetResponderCapture,onMoveShouldSetResponder,onResponderGrant/Move/Release/Terminate,onResponderTerminationRequest). Wrap<PlainText>in aPressableinstead. disabled: only meaningful alongside press handlers.dataDetectorType: turns substrings into tappable links, which makes the label interactive.onTextLayout