<Text style={styles.TextStyle}>
This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.
</Text>
I want to use dots if content exceed more than what I need to display
<Text style={styles.TextStyle}>
This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.
</Text>
I want to use dots if content exceed more than what I need to display
Share Improve this question asked Nov 22, 2019 at 6:53 Varunkumar GandeVarunkumar Gande 5996 silver badges18 bronze badges1 Answer
Reset to default 5Reference for the answer numberOfLines. just use numberOfLines quantity, if you put numberOfLines = { 2 }, it will display 2 lines and extra text will be in dots.
<Text style={styles.TextStyle} numberOfLines = { 1 } ellipsizeMode = 'head'>
This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.This is the Sample Ellipsis Text for Ellipsis from Start.
</Text>