krizic / react-read-more-less

Simple package for read more link at end of the paragraph.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Read More Less

NPM npm version license-isc

Install

npm install react-read-more-less --save

Usage

import ReadMoreAndLess from 'react-read-more-less';

class ReadMoreAndLessText extends Component {
    render() {
        return (
            <ReadMoreAndLess
                ref={this.ReadMore}
                className="read-more-content"
                charLimit={250}
                readMoreText="Read more"
                readLessText="Read less"
            >
                {Paragraph}
            </ReadMoreAndLess>
        );
    }
}

PROPTYPES

Prop Type Default
className String
charLimit integer 150
readMoreText String Read more
readLessText String Read less

react-read-more-less

About

Simple package for read more link at end of the paragraph.

License:ISC License


Languages

Language:JavaScript 100.0%