Skip to content Skip to sidebar Skip to footer

How To Horizontally Center React Native Flexbox Text That Wraps Across Multiple Lines

In React Native, using flexbox, text in my components are centered Horizontally (and vertically). This works as expected -- if line of text is short enough that it doe

Solution 1:

You can set the textAlign property like this:

<Textstyle={{textAlign: 'center'}}>centered Text</Text>

You can see the docs for the textAlign property here: https://reactnative.dev/docs/text-style-props#textalign

Post a Comment for "How To Horizontally Center React Native Flexbox Text That Wraps Across Multiple Lines"