Skip to content

dumpster-fire-code/react-native-pressable-selectable-text

Repository files navigation

React Native Pressable + Selectable Text

A selectable and pressable text component for React Native.

demo.mov

📦 Installation

Using Yarn

yarn add @dumpster-fire-code/react-native-pressable-selectable-text

Using NPM

npm install --save @dumpster-fire-code/react-native-pressable-selectable-text

🚀 Usage

import { SelectableText } from '@dumpster-fire-code/react-native-pressable-selectable-text';

function MyComponent {
  return (
    <SelectableText onPress={() => alert('pressed')}>
      Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    </SelectableText>
  );
}

The SelectableText component is a thin wrapper around React Native's TextInput and accepts all the same properties, other than value – which is instead expected as children.

🔨 Development

Installing dependencies

After installing Node and Yarn, run yarn install from the project root to install package dependencies.

Starting example app

To start the example Expo app:

cd example
yarn start

Syncing the package

To have Watchman) watch for changes to the package, then synchronize the example app using Yalc, run yarn watch from the project root.

About

A selectable and pressable text component for React Native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published