Hello Friends 👋,
Welcome To Infinitbility! ❤️
This tutorial will be help you to make text justify in your react native application. Here you will get textAlign justify example and if not working then alternative solution.
React Native provide textAlign style to make to make text justify but it’s works in iOS, and android 8.0 ( Oreo ) or above (API level >= 26).
The value will fallback to left
on lower Android versions.
If you want to go with this then we have provide example for you.
textAlign justify add space between every sententance like below example.
textAlignJustify.js
1import React from 'react';2import { StyleSheet, Text, View } from 'react-native';34const LotsOfStyles = () => {5 return (6 <View style={styles.textContainer}>7 <Text style={[styles.text, {fontSize: 50, fontWaight: "900"}]}>Infinitbility</Text>8 <Text style={styles.text}>We have the ability to build infinite way for us.</Text>9 </View>10 );11};1213const styles = StyleSheet.create({14 textContainer: {15 flex: 1,1617 },18 text: {19 fontSize: 30,20 textAlign: 'justify',21 }22});2324export default LotsOfStyles;
Output

Text align in react native complete tutorial and every posiable examples
https://infinitbility.com/react-native/text-align-in-react-native
WebView the alternative solution
Well, if want to make text justify in each and every devices then we have option of react native web view.
https://github.com/react-native-webview/react-native-webview
1<View style={{flex: 1}}>2 <WebView3 source={{ html: "<p style='text-align: justify;'>We have the ability to build infinite way for us.</p>" }}4 />5</View>
Thanks for reading…
Follow me on Twitter
Join our email list and get notified about new content
No worries, I respect your privacy and I will never abuse your email.
Every week, on Tuesday, you will receive a list of free tutorials I made during the week (I write one every day) and news on other training products I create.