Navigate back to the homepage

Letter spacing in React Native

Infinitbility
Style
May 4th, 2021 · 1 min read
Letter spacing in React Native

Hi Devs’,

Welcome to infinitbility,

This article help you to use letterSpacing in react native with their output example.

React Native provide letterSpacing style props to make space between text.

let’s start today topic letterSpacing in React Native Or how to use letterSpacing in react native

letterSpacing default value is 0 use if developer not defined letterSpacing for text.

Table of contents

  1. letterSpacing Props
  2. letterSpacing 1
  3. letterSpacing 10
  4. letterSpacing 20

letterSpacing Props

Increase or decrease the spacing between characters. By default there is no extra letter spacing.

TypeDefault
numberauto

letterSpacing 1 example

below example show 1 char space between texts.

letterSpacing1.js

1import React from 'react';
2import { StyleSheet, Text, View } from 'react-native';
3
4const LotsOfStyles = () => {
5 return (
6 <View style={styles.textContainer}>
7 <Text style={[styles.text, {fontSize: 20}]}>Infinitbility</Text>
8 </View>
9 );
10};
11
12const styles = StyleSheet.create({
13 textContainer: {
14 flex: 1,
15 justifyContent: 'center',
16 padding: 20
17 },
18 text: {
19 fontSize: 10,
20 textAlign: 'center',
21 letterSpacing: 1,
22 }
23});
24
25export default LotsOfStyles;

Output

react native letterSpacing 1

letterSpacing 10 example

below example show 10 char space between texts.

letterSpacing10.js

1import React from 'react';
2import { StyleSheet, Text, View } from 'react-native';
3
4const LotsOfStyles = () => {
5 return (
6 <View style={styles.textContainer}>
7 <Text style={[styles.text, {fontSize: 20}]}>Infinitbility</Text>
8 </View>
9 );
10};
11
12const styles = StyleSheet.create({
13 textContainer: {
14 flex: 1,
15 justifyContent: 'center',
16 padding: 20
17 },
18 text: {
19 fontSize: 10,
20 textAlign: 'center',
21 letterSpacing: 10,
22 }
23});
24
25export default LotsOfStyles;

Output

react native letterSpacing 1

letterSpacing 20 example

below example show 20 char space between texts.

letterSpacing20.js

1import React from 'react';
2import { StyleSheet, Text, View } from 'react-native';
3
4const LotsOfStyles = () => {
5 return (
6 <View style={styles.textContainer}>
7 <Text style={[styles.text, {fontSize: 20}]}>Infinitbility</Text>
8 </View>
9 );
10};
11
12const styles = StyleSheet.create({
13 textContainer: {
14 flex: 1,
15 justifyContent: 'center',
16 padding: 20
17 },
18 text: {
19 fontSize: 10,
20 textAlign: 'center',
21 letterSpacing: 20,
22 }
23});
24
25export default LotsOfStyles;

Output

react native letterSpacing 20

Thanks For Reading…

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.

Looking For React Native Tutorial?

we are trying to create the best Tutorial for react native developers.

When you want a daily updates about React Native Tutorial or infinitbility update subscribe to our newsletter.

Read React Native Tutorial

Request New Tutorial or Article on mail [email protected]

More articles from Infinitbility

font weight in React Native

font weight in React Native

React Native Tutorial - fontWeight in React Native

May 3rd, 2021 · 1 min read
RGB in react native

RGB in react native

React Native Tutorial - how to use rgb() in react native

May 2nd, 2021 · 1 min read
© 2021 Infinitbility
Link to $https://medium.com/infinitbilityLink to $https://www.facebook.com/InfinitbilityLink to $https://github.com/infinitbilityLink to $https://twitter.com/infinitbilityLink to $https://www.buymeacoffee.com/infinitbilityLink to $mailto:[email protected]