react-native-text
Inline elements implementation
Just set the correct flexDirection. Default is column. <View style={{flexDirection: ‘row’}}> <Text> Start here, </Text> <Text> finish here </Text> </View>
Is it possible to capitalize first letter of text/string in react native? How to do it?
Write a function like this Capitalize(str){ return str.charAt(0).toUpperCase() + str.slice(1); } then call it from <Text> tag By passing text as parameter <Text>{this.Capitalize(this.state.title)} </Text>
How do I make text bold, italic, or underline in React Native?
<Text style={styles.bold}>I’m bold!</Text> <Text style={styles.italic}>I’m italic!</Text> <Text style={styles.underline}>I’m underlined!</Text> const styles = StyleSheet.create({ bold: {fontWeight: ‘bold’}, italic: {fontStyle: ‘italic’}, underline: {textDecorationLine: ‘underline’} }) Working demo on Snack: https://snack.expo.io/BJT2ss_y7