1.1.3 • Published 4 years ago

read-more-less-react v1.1.3

Weekly downloads
22
License
MIT
Repository
-
Last release
4 years ago

Version Build Status Dependencies Bundle size License

React read more/less

A react component for long text that needs read more/less functionality.

Codesandbox demo

Note

Do not forget to import the styling

import 'read-more-less-react/dist/index.css';
props
propssignaturerequireddescription
textstringtrueText to be displayed with read more/less
linesnumberfalseNumber of lines to be showed when in collapsed state (default: 3)
type'plainText', 'html'falseType of the text. It can be either plain text string or an html string
readMoreTextstringfalseRead more button text (default: More)
readLessTextstringfalseRead less button text (default: Less)
onAction() => voidfalseIf passed, this method will be called when Read more button is clicked
classes
css classdescription
rm-containerMain container class
rm-text-wrapperText wrapper class
rm-typographyText class
rm-action-button-containerAction button container class
rm-more-buttonAction read-more button class
rm-less-buttonAction read-less button class

Example

import ReadMoreText from 'read-more-less-react';
import 'read-more-less-react/dist/index.css'
<ReadMoreText
    lines={5}
    text={TEXT}
/>

Note

Do not forget to import the styling import 'read-more-less-react/dist/index.css';

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago