Package Exports
- react-native-input-keyboard
- react-native-input-keyboard/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-input-keyboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Native Input Keyboard
This component will automatically the screen to remain the focused input visible while the virtual keyboard is displayed.
Installation
yarn add react-native-input-keyboard
OR
npm install react-native-input-keyboard
Expo
Expo is fully supported.
Usage
import { TextInput } from 'react-native';
import InputKeyboard from 'react-native-input-keyboard';
function Screen() {
return (
<InputKeyboard>
{/* ... */}
<TextInput />
{/* ... */}
</InputKeyboard>
)
}
Props
Inherits View Props.
Prop | Type | Default | Description |
---|---|---|---|
enabled |
boolean |
true |
Enabled or disabled interation. |
offset |
number |
0 |
This is the distance between the top of the user screen and the react native view, may be non-zero in some use cases. |
onPress |
function |
Keyboard.dismiss |
The behavior when users press outside the input. |