Skip to content

Duell10111/react-native-image-keyboard

 
 

Repository files navigation

@duell10111/react-native-image-keyboard

NPM Version Badge

iOS Android
iOS Example GIF Android 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

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

Original logic from [Gustash] (https://github.com/Gustash/react-native-image-keyboard)

Android logic based on stwiname's PR: facebook/react-native#26088

About

React Native TextInput expansion to enable media input.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 26.2%
  • Java 18.4%
  • Objective-C 17.3%
  • Swift 15.2%
  • TypeScript 6.4%
  • Ruby 5.8%
  • Other 10.7%