How to Create Strike Through Text in React Native Android iOS App

Strike Through Text is mostly used in e-commerce applications where seller gives some discount to its customers. Strike Through Text is basically a Cross Line Out Text where the text is cut through a line in the middle of the. The strength line in draw in the middle of text and go strength to end of text. So in this tutorial we would going to Create Strike Through Text in React Native Android iOS App using textDecorationLine: ‘line-through’ text style.

Contents in this project Create Strike Through Text in React Native Android iOS App :

1. Import StyleSheet, View and Text component in your project.

2. Create a Parent View in render’s return block.

3. Create a Text component in Root View and call TextStyle CSS style class. This class is our main class.

4. Create 2 CSS style classes in your project. The MainContainer class is for Root View and the TextStyle for Text component. Now we would call the textDecorationLine: ‘line-through’ style property of Text. This property would make the text Strike Through.

5. Complete source code for App.js File :

Screenshot in Android device :

Screenshot in iOS device :

Create Strike Through Text

Leave a Reply

Your email address will not be published.