Skip to content

Ahmedhamed77/react-native-toggle-more-less-text

Repository files navigation

react-native-toggle-more-less

react native package to toggle number of lines on react native text

Installation

npm install react-native-toggle-more-less

Usage

import { RnViewMoreLess } from 'react-native-toggle-more-less';

// ...

      <RnViewMoreLess
        numberOfLines={4}
        desc={textToDisplay}
        containerStyle={styles.viewMoreContainer}
        descStyle={styles.descStyle}
        moreText={'show more'}
        moreTextStyle={styles.moreLessTextStyle}
        lessText="show less"
        lessTextStyle={styles.moreLessTextStyle}
      />

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library