juangl / react-truncated-component

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

Home Page:https://react-truncated-component.now.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


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

About

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

https://react-truncated-component.now.sh/


Languages

Language:JavaScript 93.3%Language:CSS 5.0%Language:HTML 1.7%