Skip to content

react-native-advanced-text is a powerful cross-platform text component for React Native that enables word-level interaction, dynamic highlighting, and custom selection actions.

License

Notifications You must be signed in to change notification settings

AminAllahham/react-native-advanced-text

react-native-advanced-text

react-native-advanced-text is a powerful cross-platform text component for React Native that enables word-level interaction, dynamic highlighting, and custom selection actions.

Installation

npm install react-native-advanced-text

Usage

import { AdvancedTextView } from "react-native-advanced-text";

<AdvancedText
  text={'This is an example of AdvancedText component. Tap on any word to see the event in action.'}
  style={[styles.AdvancedText, { minHeight }]}
  indicatorWordIndex={2}
  onWordPress={(event) => {
    console.log({event})
  }}
  menuOptions={['Highlight', 'Copy', 'Translate']}
  onSelection={(event) => {
    console.log({event})
  }}
  highlightedWords={[
    {
      index: 4,
      highlightColor: '#6baeffb5',
    },
  ]}
  fontSize={24}
  color={'#FFFFFF'}
  fontWeight="normal"
  fontFamily={'monospace'}
/>

Contributing

License

MIT


Made with create-react-native-library

About

react-native-advanced-text is a powerful cross-platform text component for React Native that enables word-level interaction, dynamic highlighting, and custom selection actions.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published