
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-native-text-toolkit
Advanced tools
Native text utilities (Look Up and Translate) for React Native and Expo apps
Native text utilities (Look Up and Translate) for React Native and Expo apps.
This module provides native "Look Up" and "Translate" functionality for selected text in your React Native or Expo app, using platform-specific APIs.
UIReferenceLibraryViewController to show dictionary definitions. On Android, uses ACTION_PROCESS_TEXT or falls back to web search.ACTION_PROCESS_TEXT. Both platforms fall back to Google Translate in the browser.npm install react-native-text-toolkit
import { lookUp, translate } from 'react-native-text-toolkit';
// Look up a word in the dictionary
lookUp('serendipity');
// Translate text
translate('Hello, world!');
lookUp(text: string): voidLook up a word or phrase using the system dictionary (iOS) or text processing actions (Android).
UIReferenceLibraryViewController with the definition if availableACTION_PROCESS_TEXT or falls back to web searchtranslate(text: string): voidTranslate text using the system translation service or Google Translate.
ACTION_PROCESS_TEXT or Google Translateimport React, { useState } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { lookUp, translate } from 'react-native-text-toolkit';
export default function TextActionsExample() {
const [selectedText, setSelectedText] = useState('serendipity');
return (
<View style={{ padding: 20 }}>
<Text>Selected text: {selectedText}</Text>
<TouchableOpacity onPress={() => lookUp(selectedText)}>
<Text>Look Up</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => translate(selectedText)}>
<Text>Translate</Text>
</TouchableOpacity>
</View>
);
}
_define: or _lookup: selectors. Falls back to Google search if unavailable._translate: selector. Falls back to Google Translate for iOS < 15 or if the feature is unavailable.MIT
FAQs
Native text utilities (Look Up and Translate) for React Native and Expo apps
The npm package react-native-text-toolkit receives a total of 0 weekly downloads. As such, react-native-text-toolkit popularity was classified as not popular.
We found that react-native-text-toolkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.