Skip to content

✂️ React component to truncate text with format and paragraphs support included.

Notifications You must be signed in to change notification settings

juangl/react-truncated-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

13cffce · Jan 11, 2022

History

43 Commits
Aug 30, 2019
Mar 31, 2020
Dec 22, 2018
Dec 22, 2018
Dec 22, 2018
Dec 22, 2018
Dec 25, 2018
Dec 22, 2018
Dec 26, 2018
Oct 6, 2019
Dec 26, 2018
Dec 8, 2021
Dec 22, 2018
Jun 5, 2019

Repository files navigation


React component to truncate your text with format and paragraphs support included.

NPM Build

Install

npm install --save react-truncated-component

Usage

function TruncatedText() {
  return (
    <ReactTruncatedComponent ellipsis="..." numberOfLines={5} lineHeight={23}>
      <p>{/*


    put your long text right here


    */}</p>
    </ReactTruncatedComponent>
  );
}

Docs

To see the documentation visit the website.

License

MIT © Juan Garcia