Import ReadMore from @fawazahmed/react-native-read-more and wrap your text content. You can specify the number of lines to show before the text is condensed using the numberOfLines prop.
import React from 'react';
import {SafeAreaView, StyleSheet, View} from 'react-native';
import ReadMore from '@fawazahmed/react-native-read-more';
const Home = () => {
return (
<SafeAreaView style={styles.safe}>
<View style={styles.root}>
<ReadMore numberOfLines={3} style={styles.textStyle}>
{
"Lorem Ipsum is simply dummy text of the printing and typesetting industry..."
}
</ReadMore>
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
safe: { flex: 1 },
root: { flex: 1, padding: 16 },
textStyle: { fontSize: 14 },
});
export default Home;