I need to indent the first line of a paragraph on React Native. But the use of the common css text-indent
property (textIndent
) isn't compatible with React Native, and neither are pseudo-element selectors (like :first-line
). Is there any way to do this without wrapping the whole line in <Text>
tags and defining its own style? Which words will end up in the first line of a paragraph is somewhat indeterministic from one device's viewport to another device's viewport.
Use {'\t'}
. Just like this:
<Text>{'\t'}Hi there</Text>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With