React component to truncate your text with format and paragraphs support included.
npm install --save react-truncated-component
function TruncatedText() {
return (
<ReactTruncatedComponent ellipsis="..." numberOfLines={5} lineHeight={23}>
<p>{/*
put your long text right here
*/}</p>
</ReactTruncatedComponent>
);
}
To see the documentation visit the website.
MIT © Juan Garcia