Skip to content

Commit 8d956e3

Browse files
authored
Update README.md
1 parent 0db8aca commit 8d956e3

1 file changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1-
# React Native Nitro Text
2-
A Text component that is much richer and performant for both iOS and Android.
1+
<div align="center">
2+
<h1>react-native-nitro-text</h1>
3+
</div>
4+
5+
<div align="center">
6+
<video src="https://github.com/user-attachments/assets/1e2baa07-fe07-43a5-a3db-86ed051daa5a" alt="React Native Nitro Text" />
7+
</div>
8+
9+
<p align="center">
10+
A Text component that is much richer and performant for both iOS and Android.
11+
</p>
12+
13+
---
14+
15+
<div align="center">
316

417
[![Version](https://img.shields.io/npm/v/react-native-nitro-text.svg)](https://www.npmjs.com/package/react-native-nitro-text)
518
[![Downloads](https://img.shields.io/npm/dm/react-native-nitro-text.svg)](https://www.npmjs.com/package/react-native-nitro-text)
619
[![License](https://img.shields.io/npm/l/react-native-nitro-text.svg)](https://github.com/patrickkabwe/react-native-nitro-text/LICENSE)
720

21+
</div>
22+
823
## Features
924

1025
- Works on both iOS and Android(currently fallback to RN `Text` on Android)
@@ -46,6 +61,24 @@ export function Title() {
4661
}
4762
```
4863

64+
## Selection
65+
66+
iOS uses native selection. On Android, NitroText currently falls back to React Native `Text`.
67+
68+
```tsx
69+
import { NitroText as Text } from 'react-native-nitro-text'
70+
71+
export function SelectionExample() {
72+
return (
73+
<Text selectable style={{ fontSize: 16, lineHeight: 22 }}>
74+
Long-press to select this text. NitroText supports smooth selection,
75+
even with <Text style={{ fontWeight: '600' }}>inline styles</Text> and
76+
longer paragraphs.
77+
</Text>
78+
)
79+
}
80+
```
81+
4982
## Platform Support
5083

5184
- iOS

0 commit comments

Comments
 (0)