Interspace between text Lines in React native

TextReact Native

Text Problem Overview


I need to change the space between lines in a text in a React Native for both android and iOS. This is the code in the styles pages:

text: {
  color: '#C0C0C0',
  fontSize: 18,
  textAlign: 'justify',
}

Text Solutions


Solution 1 - Text

Use lineHeight -

  text: {
    color: '#C0C0C0',
    fontSize: 18,
    textAlign: 'justify',
    lineHeight: 30,
  },

Solution 2 - Text

You can use

{'\n'}

inside your Text tag

example :

<Text>{'\n'} Heading : </Text>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3521011View Question on Stackoverflow
Solution 1 - TextvinayrView Answer on Stackoverflow
Solution 2 - TextSalem_RaoufView Answer on Stackoverflow