Skip to content

leviit9x/rn-show-more-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rn-show-more-text

A super lightweight plugin to expand/collapse text in React-Native. Truncated text is ended with dotdotdot.

Working on IOS/Android/Ipad

Installation

npm install --save @leviit9x/rn-show-more-text

or

yarn add @leviit9x/rn-show-more-text

Usage

  • numberOfLines(number)(*required): Number of lines to be displayed.
  • text(string): full text.
  import { RNShowMoreText } from '@leviit9x/rn-show-more-text';
  
  
  export default function Example() {
    return (
      <RNShowMoreText 
      text={'Lorem ipsum dolor sit amet, in quo dolorum ponderum, nam veri molestie constituto eu. Eum enim tantas sadipscing ne, ut omnes malorum nostrum cum. Errem populo qui ne, ea ipsum antiopam definitionem eos.'} 
      numOfLines={2}
      >
    )
  }

About

Support to display more text or less text

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published