2.2.1 • Published 6 months ago

react-native-image-keyboard v2.2.1

Weekly downloads
419
License
MIT
Repository
github
Last release
6 months ago

react-native-image-keyboard

NPM Version Badge

iOSAndroid
iOS Example GIFAndroid Example GIF

About this package

This package extends React Native's TextInput component to enable keyboard image input on:

  • Android (e.g. Gboard GIFs)
  • iOS (e.g. Pasting images copied to the clipboard)

Getting started

$ npm install react-native-image-keyboard --save

Mostly automatic installation

$ react-native link react-native-image-keyboard (RN < 0.60)

$ cd ios/ && pod install

Usage

TypeScript

If you're using TypeScript in your project, you should add the following import in your index.ts or index.js to make TS aware of the onImageChange prop type:

// index.ts / index.js

import 'react-native-image-keyboard';

// ...
import {TextInput} from 'react-native';

const App = () => {
  const _onImageChange = (event) => {
    const {uri, linkUri, mime, data} = event.nativeEvent;

    // Do something with this data
  }

  return <TextInput onImageChange={_onImageChange} />;
}

Credits

Android logic based on stwiname's PR: https://github.com/facebook/react-native/pull/26088

2.2.1

6 months ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

2.0.0

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago