@molecule/app-keyboard-react-native
v1.0.2
Published
React Native keyboard provider for molecule.dev (Keyboard API)
Readme
@molecule/app-keyboard-react-native
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
React Native keyboard provider for molecule.dev.
Uses react-native's Keyboard/Dimensions to implement the
KeyboardProvider interface from @molecule/app-keyboard: dismiss,
visibility + height state, and show/hide events.
Quick Start
import { setProvider } from '@molecule/app-keyboard'
import { provider } from '@molecule/app-keyboard-react-native'
setProvider(provider) // once, at app startupType
provider
Installation
npm install @molecule/app-keyboard-react-native @molecule/app-i18n @molecule/app-keyboard @molecule/app-logger react-nativeAPI
Functions
createReactNativeKeyboardProvider()
Creates a React Native keyboard provider backed by react-native Keyboard.
function createReactNativeKeyboardProvider(): KeyboardProviderReturns: A KeyboardProvider implementation for React Native.
Constants
provider
Default React Native keyboard provider.
const provider: KeyboardProviderCore Interface
Implements @molecule/app-keyboard interface.
Bond Wiring
Setup function to register this provider with the core interface:
import { setProvider } from '@molecule/app-keyboard'
import { provider } from '@molecule/app-keyboard-react-native'
export function setupNativeKeyboardReactNative(): void {
setProvider(provider)
}Injection Notes
Requirements
Peer dependencies:
@molecule/app-i18n^1.0.1@molecule/app-keyboard^1.0.1@molecule/app-logger^1.0.1react-native>=0.72.0
Runtime Dependencies
@molecule/app-i18n@molecule/app-keyboard@molecule/app-loggerreact-nativeshow()is a no-op andtoggle()can only hide — React Native cannot open the keyboard programmatically; focus aTextInputinstead.hide()works (Keyboard.dismiss()).setResizeMode/setStyle/setAccessoryBar/setScrollare no-ops in this bond — resize is configured in AndroidManifest.xml / app.json, scroll viaKeyboardAvoidingView.getCapabilities()reports all fourfalse; feature-gate on it rather than assuming the calls did something.Requires the
react-nativepeer; it is imported lazily and a missing install surfaces as a descriptive error on first use.
Translations
Translation strings are provided by @molecule/app-locales-keyboard.
