How To Create Underline Text In React Native App Using CSS Style

textDecorationLine: ‘underline’ style property of Text component is used to create Underline Text in both Android and iOS react native application. So in this tutorial we would going to create react native app with Underline Text component.

Contents in this project Create Underline Text In React Native :

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

2. Create Root View in render’s return block with Text component.

3. Create 2 style classes in your project. MainContainer style for Root View and TextStyle class for Text component. Now set textDecorationLine: ‘underline’ style in TextStyle .

4. Complete source code for App.js File :

Screenshot in iOS device :

Underline Text

Screenshot in Android device :

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *