Gathering detailed insights and metrics for react-native-keyboard-input
Gathering detailed insights and metrics for react-native-keyboard-input
Gathering detailed insights and metrics for react-native-keyboard-input
Gathering detailed insights and metrics for react-native-keyboard-input
react-native-keyboard-controller
Keyboard manager which works in identical way on both iOS and Android
react-native-keyboard-avoiding-input
This library allows you to pass the textinput just above the keyboard, thus floating on it, in cases that this is necessary. All the props are passed down to a new TextInput Component.
react-native-avoid-softinput
Native logic for avoiding covering text inputs by soft input views
react-native-input-keyboard
This component will automatically adjust the screen to remain the focused input visible while the virtual keyboard is displayed.
Use your own custom input component instead of the system keyboard
npm install react-native-keyboard-input
Typescript
Module System
Node Version
NPM Version
35.3
Supply Chain
56.3
Quality
70.8
Maintenance
25
Vulnerability
93.2
License
Objective-C (33.08%)
JavaScript (29.4%)
Java (29.16%)
Objective-C++ (3.41%)
Ruby (3.12%)
Starlark (1.83%)
Total Downloads
307,033
Last Day
11
Last Week
848
Last Month
3,608
Last Year
54,446
MIT License
828 Stars
238 Commits
151 Forks
278 Watchers
26 Branches
12 Contributors
Updated on Jul 07, 2025
Latest Version
6.0.2
Package Id
react-native-keyboard-input@6.0.2
Unpacked Size
553.19 kB
Size
251.03 kB
File Count
97
NPM Version
6.14.5
Node Version
12.17.0
Cumulative downloads
Total Downloads
Last Day
-56%
11
Compared to previous day
Last Week
-17.3%
848
Compared to previous week
Last Month
23.4%
3,608
Compared to previous month
Last Year
-24.6%
54,446
Compared to previous year
2
2
21
Presents a React component as an input view which replaces the system keyboard. Can be used for creating custom input views such as an image gallery, stickers, etc.
Supports both iOS and Android.
Install the package from npm:
yarn add react-native-keyboard-input
or npm i --save react-native-keyboard-input
Update your dependencies in android/app/build.gradle
:
1dependencies { 2 // Add this dependency: 3 compile project(":reactnativekeyboardinput") 4}
Update your android/settings.gradle
:
1include ':reactnativekeyboardinput' 2project(':reactnativekeyboardinput').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keyboard-input/lib/android')
In your MainApplication.java
, add to the getPackages()
list:
1import com.wix.reactnativekeyboardinput.KeyboardInputPackage; 2 3@Override 4protected List<ReactPackage> getPackages() { 5 return Arrays.<ReactPackage>asList( 6 // Add this package: 7 new KeyboardInputPackage(this) // (this = Android application object) 8 ); 9}
If you have pro-guard enabled and are having trouble with your build, apply this to your project's main proguard-rules.pro
:
-dontwarn com.wix.reactnativekeyboardinput.**
In Xcode, drag both RCTCustomInputController.xcodeproj
and KeyboardTrackingView.xcodeproj
from your node_modules
to the Libraries folder in the Project Navigator, then add libRCTCustomInputController.a
and libKeyboardTrackingView.a
to your app target "Linked Frameworks and Libraries".
To utilize this feature you'll need to add KeyboardTrackingView
to your projects scheme build action.
From Xcode menu:
product -> scheme -> manage schemes -> double-click your project
KeyboardTrackingView
.KeyboardTrackingView
to be first, above your project, and unmark "Parallelize Build" option at the top.If necessary, you can take a look at how it is set-up in the demo project.
There are 2 main parts necessary for the implementation:
Create a component that you wish to use as a keyboard input. For example:
1class KeyboardView extends Component { 2 static propTypes = { 3 title: PropTypes.string, 4 }; 5 render() { 6 return ( 7 <ScrollView contentContainerStyle={[styles.keyboardContainer, {backgroundColor: 'purple'}]}> 8 <Text style={{color: 'white'}}>HELOOOO!!!</Text> 9 <Text style={{color: 'white'}}>{this.props.title}</Text> 10 </ScrollView> 11 ); 12 } 13}
Now register with the keyboard registry so it can be used later as a keyboard:
1import {KeyboardRegistry} from 'react-native-keyboard-input'; 2 3KeyboardRegistry.registerKeyboard('MyKeyboardView', () => KeyboardView);
When you need to notify about selecting an item in the keyboard, use:
1KeyboardRegistry.onItemSelected(`MyKeyboardView`, params);
While this package provides several component and classes for low-level control over custom keyboard inputs, the easiets way would be to use KeyboardAccessoryView
. It's the only thing you'll need to show your Keyboard component as a custom input. For example:
1<KeyboardAccessoryView 2 renderContent={this.keyboardToolbarContent} 3 kbInputRef={this.textInputRef} 4 kbComponent={this.state.customKeyboard.component} 5 kbInitialProp={this.state.customKeyboard.initialProps} 6/>
Prop | Type | Description |
---|---|---|
renderContent | Function | a fucntion for rendering the content of the keyboard toolbar |
kbInputRef | Object | A ref to the input component which triggers the showing of the keyboard |
kbComponent | String | The registered component name |
kbInitialProps | Object | Initial props to pass to the registered keyboard component |
onItemSelected | Function | a callback function for a selection of an item in the keyboard component |
This component takes care of making your toolbar (which is rendered via renderContent
) "float" above the keyboard (necessary for iOS), and for setting your component as the keyboard input when the kbComponent
changes.
See demoScreen.js for a full working example.
No vulnerabilities found.
Reason
license file detected
Details
Reason
binaries present in source code
Details
Reason
Found 4/7 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
64 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More