Logo: React Native Keyboard Handling

React Native Keyboard Handling

Communautéit
bidah
react-native-keyboard-handling

Implementéiert frame-perfekt Tastaturbedéngungen, déi sech a React Native- an Expo-Apps wéi nativ ufillen. Benotzt dëse Skill, wann d'Tastatur Inhalter verdeckt, wann Tastaturanimatiounen op Android ruckelen oder „sprangen“, wann Inputfelder vun der Tastatur verstoppt ginn, wann d'Tastatur op Android 15 am Edge-to-Edge-Modus Felder verdeckt, obwuel et mat méi ale Versioune vun Android funktionéiert huet, oder wann Dir Formulairen, pecheg Fousszeilen oder Chat-Input-Leeschte baut, déi der Tastatur musse follegen. Ausléiser: „keyboard covers input“, „KeyboardAvoidingView not working on Android“, „keyboard animation janky“, „keyboard sticky footer“, „Android 15 keyboard“, „edge-to-edge keyboard“, react-native-keyboard-controller.

Add to TypingMind

Iwwersiicht

Editeurbidah
Repositoryskill-set
Skill-Nummreact-native-keyboard-handling
Stären
276
Forks
32
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    bidah huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill React Native Keyboard Handling an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/bidah/skill-set/tree/main/skills/react-native-keyboard-handling
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bidah/skill-set.git /tmp/skill-set
mkdir -p .claude/skills
cp -r /tmp/skill-set/skills/react-native-keyboard-handling .claude/skills/react-native-keyboard-handling
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert React Native Keyboard Handling an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet React Native Keyboard Handling automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass React Native Keyboard Handling net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

React Native Keyboard Handling

Make the keyboard feel native on both platforms by mapping two fundamentally different OS keyboard models onto one animated value that your UI binds to.

The core mental model (read this first)

iOS and Android expose the keyboard in incompatible ways. Most "broken keyboard" bugs come from ignoring this asymmetry.

  • iOS = scheduled animation. The OS tells you up front: "the keyboard will slide from A to B over 0.25s with this easing curve." You get two snapshots (start/end) plus duration and curve — not intermediate frames. UIKit interpolates for you.
  • Android (modern, edge-to-edge) = per-frame insets. The IME is just another system window. You get a firehose of frames, one inset value per frame, and you drive the animation yourself.

Anything that ignores this asymmetry will feel broken. The fix is to map both models onto a single shared animated value, then have every consumer (padded container, translated footer, scroll offset) bind to that one value and stop caring which platform feeds it.

Decision guide — which tool to reach for

SituationUse
Whole screen / single input should stay above keyboardKeyboardAvoidingView (from react-native-keyboard-controller)
Scrollable form with multiple inputsKeyboardAwareScrollView
One element pinned above the keyboard (footer, send bar, toolbar)KeyboardStickyView
Fully custom animation tied to keyboard positionuseReanimatedKeyboardAnimation() / useKeyboardHandler() + Reanimated SharedValue

Default recommendation: use react-native-keyboard-controller, not React Native's built-in KeyboardAvoidingView. The built-in version relies on LayoutAnimation and the late keyboardDidShow event, which has no per-frame Android primitive — so Android content snaps instead of sliding and the timing never matches the keyboard curve.

Setup

  1. Install the library and its peer deps:
    bash
    npm install react-native-keyboard-controller react-native-reanimated
  2. Wrap your app root once in KeyboardProvider. This installs the native WindowInsetsAnimationCallback subscription on Android and handles edge-to-edge automatically:
    tsx
    import { KeyboardProvider } from "react-native-keyboard-controller";
    
    export default function App() {
      return (
        <KeyboardProvider>
          {/* ...rest of the app */}
        </KeyboardProvider>
      );
    }

Patterns

Single input / simple screen — drop-in replacement

Same API as RN's KeyboardAvoidingView; swapping the import alone fixes the Android timing/snap problems.

tsx
import { KeyboardAvoidingView } from "react-native-keyboard-controller";

<KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>
  {/* input(s) */}
</KeyboardAvoidingView>

Scrollable form — track the focused input

Auto-scrolls the minimum distance to keep the focused input (and caret/selection) above the keyboard, using the same curve as the keyboard motion. bottomOffset adds breathing room between the input and the keyboard top.

tsx
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";

<KeyboardAwareScrollView bottomOffset={50} style={{ flex: 1 }}>
  <TextInput placeholder="Field 1" />
  <TextInput placeholder="Field 2" />
  {/* more inputs */}
</KeyboardAwareScrollView>

Sticky footer / send bar — translate one element only

Translates a single element instead of recomputing flex layout for the whole screen. offset controls the gap when the keyboard is open vs closed.

tsx
import { KeyboardStickyView } from "react-native-keyboard-controller";

<KeyboardStickyView offset={{ closed: 0, opened: 20 }}>
  <Footer />
</KeyboardStickyView>

Custom animation — bind to the shared keyboard value

For fully bespoke motion, read the keyboard height as a Reanimated SharedValue and drive any style from it. Works identically on both platforms because the library already merged the two OS models into this one value.

tsx
import { useReanimatedKeyboardAnimation } from "react-native-keyboard-controller";
import Animated, { useAnimatedStyle } from "react-native-reanimated";

const { height } = useReanimatedKeyboardAnimation(); // SharedValue, per-frame
const style = useAnimatedStyle(() => ({
  transform: [{ translateY: height.value }],
}));

<Animated.View style={style}>{/* ... */}</Animated.View>;

Pitfalls & gotchas

  • Android 15 / SDK 35 covers your inputs. Edge-to-edge is forced by default from Android 15 (API 35). The system no longer resizes the window when the keyboard appears, so the old adjustResize / windowSoftInputMode contract silently breaks — inputs get covered even though the exact same code worked on Android 14. KeyboardProvider handles edge-to-edge for you; don't rely on adjustResize.
  • will* events never fire on Android. keyboardWillShow / keyboardWillHide have no underlying Android primitive, and keyboardDidShow fires after the animation finishes — too late to animate in sync. Don't build animations on the raw Keyboard event listeners for Android.
  • Stock KeyboardAvoidingView + Android = snap, not slide. It uses LayoutAnimation, whose timing doesn't match the keyboard curve on Android, so motion looks janky. Prefer the keyboard-controller version.
  • Version fragmentation is real. Behavior that "works" on Android 10 can break differently on Android 11 and again on Android 15. Use a library that abstracts the OS differences instead of hand-rolling per-version logic.
  • Wrong component for the job. Using KeyboardAvoidingView for a multi-input form won't track which input is focused, so the caret can stay hidden — use KeyboardAwareScrollView. Using it to move a single footer forces an unnecessary full-screen layout recompute — use KeyboardStickyView.

Why the asymmetry exists (native reference)

Useful when debugging at the native layer or explaining the design.

  • iOS surface: NotificationCenter keyboard notifications carry keyboardFrameEndUserInfoKey (final frame), keyboardAnimationDurationUserInfoKey (timing), and keyboardAnimationCurveUserInfoKey (a private curve, UIView.AnimationCurve(rawValue: 7)). Two snapshots, not frames.
  • Android surface: WindowInsetsAnimationCallback with four hooks — onPrepare(), onStart(insets), onProgress(insets, runningAnimations) (fires every frame), onEnd(). The library subscribes here and writes each frame's inset into the shared value; on Android 11 it polyfills the per-frame stream where native support is missing.

Source

Based on Margelo's The Go-To Guide for Understanding Keyboards in React Native (Part 1): https://blog.margelo.com/deep-dive-in-keyboard-handling

Heefeg gestallte Froen

Wat mécht de KI-Skill React Native Keyboard Handling?

Implementéiert frame-perfekt Tastaturbedéngungen, déi sech a React Native- an Expo-Apps wéi nativ ufillen. Benotzt dëse Skill, wann d'Tastatur Inhalter verdeckt, wann Tastaturanimatiounen op Android ruckelen oder „sprangen“, wann Inputfelder vun der Tastatur verstoppt ginn, wann d'Tastatur op Android 15 am Edge-to-Edge-Modus Felder verdeckt, obwuel et mat méi ale Versioune vun Android funktionéiert huet, oder wann Dir Formulairen, pecheg Fousszeilen oder Chat-Input-Leeschte baut, déi der Tastatur musse follegen. Ausléiser: „keyboard covers input“, „KeyboardAvoidingView not working on Androi...

Firwat React Native Keyboard Handling op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. React Native Keyboard Handling besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech React Native Keyboard Handling an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/bidah/skill-set/tree/main/skills/react-native-keyboard-handling an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen React Native Keyboard Handling benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat React Native Keyboard Handling benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir React Native Keyboard Handling domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill React Native Keyboard Handling gratis?

bidah huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇