File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments