Text vertical align in react native (using nativebase)

ckim16 picture ckim16 · Jun 2, 2017 · Viewed 88.2k times · Source

I was wondering there is a way I can align vertically in React Native. I'm trying to position on the bottom but I don't think I can find a good way to do it.

If anyone knows how to solve this issue, please let me know.

Answer

Greg Billetdeaux picture Greg Billetdeaux · Jun 3, 2017

You can use the flex property, justifyContent to achieve this. Full documentation here.

<View style={{justifyContent: 'center'}}>
   <Text>Vertically Centered Text</Text>
</View>