React Native
We can use the numberOfLines
(https://facebook.github.io/react-native/docs/text.html#numberoflines) parameter on a Text
component:
long long long long text
Will produce:
long long long…
Use the ellipsizeMode
parameter to move the ellipsis to the head or middle. tail is the default value.
<Text numberOfLines={1} ellipsizeMode='head'}>long long long long text
Will produce:
…long long text