New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

read-more-less-react

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-more-less-react

React component for long texts that need read-more/read-less functionality

latest
npmnpm
Version
1.1.3
Version published
Weekly downloads
369
-40.96%
Maintainers
1
Weekly downloads
 
Created
Source

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';

Keywords

react

FAQs

Package last updated on 21 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts