https://github.com/aamuizz/react-native-read-more-text
React native library to show text in a brief way and expand it when needed. It is a lightweight inline read more text component. It is written in Typescript and supports both TS/JS. It can be used with react native cli and expo both
https://github.com/aamuizz/react-native-read-more-text
android inline-read-more ios react react-native read-less read-more read-more-text readmore readmoretextview
Last synced: 9 months ago
JSON representation
React native library to show text in a brief way and expand it when needed. It is a lightweight inline read more text component. It is written in Typescript and supports both TS/JS. It can be used with react native cli and expo both
- Host: GitHub
- URL: https://github.com/aamuizz/react-native-read-more-text
- Owner: aamuizz
- Created: 2022-08-14T14:41:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-08-20T18:12:22.000Z (over 3 years ago)
- Last Synced: 2025-04-09T19:08:50.884Z (9 months ago)
- Topics: android, inline-read-more, ios, react, react-native, read-less, read-more, read-more-text, readmore, readmoretextview
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@amuizz/read-more-text
- Size: 95.7 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-read-more-text
React native library to show text in a brief way and expand it when needed. It is a lightweight inline read more text component. It is written in Typescript and supports both TS/JS. It can be used with react native cli and expo both.

### Installation
```
npm i @amuizz/read-more-text --save
```
or with yarn
```
yarn add @amuizz/read-more-text
```
### Usage
```javascript
import React from 'react';
import { View } from 'react-native';
import ReadMoreText from '@amuizz/read-more-text';
const Test = () => {
return (
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type specimen book
);
};
export default Test;
```
## Props
| Prop | Type | Required | Note |
|---|---|---|---|
| `style` | `object or array` | no | text style
| `seeMoreText` | `string` | no | defaults to `more`
| `seeMoreStyle` | `object or array` | no | text style for `more` text
| `seeLessText` | `string` | no | defaults to `less`
| `seeLessStyle` | `object or array` | no | text style for `less` text
| `numberOfLines` | `number` | no | defaults to `1`
Any additional props can be passed down to underlying `Text` component.
#### Drop a star :star: to this repo, if you feel it is good