Description
React-Text-Truncate is a React component that shortens text to a set number of lines and adds an ellipsis when the text is too long. It is meant for multi-line truncation, so a paragraph or a card description can be cut to fit a fixed space. You install it and use it in place of plain text in your component, and the README includes markup examples and a demo. The FAQ says that if the component is hidden and then displayed again, such as when a tab or panel changes its display style, you need to trigger the update manually so the truncation is recalculated. It does not support Internet Explorer 10 or older, which the README describes as no longer supported by Microsoft. The project is public on GitHub, and its install and usage steps are shown in the README. Use it when a React app has text blocks that must stay within a fixed number of lines, such as article previews or listing cards.…
Highlights
- Multi-line text truncation with an ellipsis
- Works as a React component
- Demo and markup examples in the README
- Manual update when a hidden element is shown again
Ratings & Reviews
No ratings yet
Be the first to rate react-text-truncate.
People also visit

react-truncate-inside
React component that truncates text in the middle with an ellipsis
react-text-truncate FAQ
What does react-text-truncate do?
It cuts text to a set number of lines in a React component and shows an ellipsis when the text is longer.
Is it free?
Yes. The source is public on GitHub and listed as open source.
Why is my truncated text not showing after a change?
The FAQ says that if the component was hidden and is displayed again after a display style change, you must trigger an update manually.
Which browsers are supported?
The FAQ says Internet Explorer 10 and below are not supported.
What are the best react-text-truncate alternatives?
Popular alternatives to react-text-truncate include react-lines-ellipsis, react-multiline-clamp and react-truncate-inside. See all react-text-truncate alternatives




















