◉RORK LABJP
●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first●EXPO — EAS Observe now records native crashes (Oct 7). On SDK 57, update to 57.0.21 or later●SDK 58 — SDK 58 Beta has been out since Sep 15. The stable date is still unconfirmed●RN 0.88 — React Native 0.88.x is scheduled for Oct 12, 3 days left●Q&A — People are asking why expo-widgets render blank only in production builds●RORK — GPT-6.1 Sol was added on Sep 29, available on Pro and Max plans●NEW — Building an app for a client? Decide who owns the publishing account first
Articles/Dev Tools
⬡ Dev Tools/2026-06-29Advanced

Adding a keyboard toolbar to Rork text inputs — unifying iOS InputAccessoryView and an Android bar into one component

How to add a toolbar pinned above the keyboard — a Done button or quick-insert actions — to the React Native app Rork generates. The iOS InputAccessoryView and a hand-built Android bar, folded into one reusable component, with working code.

Rork577React Native238InputAccessoryViewKeyboardExpo213

✦ Premium Article

What I thought was "just drop one Done button above the input" turned into two entirely different implementations for iOS and Android, and half a day gone. I've shipped apps as an indie developer since 2014, and this came up when I added a small memo field to my wallpaper and healing apps so users could jot a line. On iOS, the dedicated InputAccessoryView worked immediately. Run the same code on Android and the toolbar never appears.

The official InputAccessoryView docs note, in small print, that it's iOS only. The form screens Rork generates don't paper over this gap, so the Android side is on you. Here's the path I took to fold both into a single reusable <KeyboardToolbar>, with the places I got stuck.

Why the "bar above the keyboard" is the part that doubles your work

A toolbar pinned above the keyboard is humble but genuinely useful. Japanese input drops uncommitted characters easily, so an explicit Done button that commits the IME composition before blurring noticeably reduces lost text. Quick-insert buttons (snippets, emoji, symbols) keep text-heavy screens flowing.

The catch is that iOS and Android produce this bar in completely different ways. The iOS InputAccessoryView is a special view the system physically attaches to the keyboard. When the keyboard rises, the bar rises with it; when it falls, they fall together. Android has no equivalent. KeyboardAvoidingView is a tool for pushing inputs above the keyboard, not for drawing a bar glued to it.

So iOS means "mount onto a dedicated component," and Android means "measure the keyboard height and position a bar absolutely yourself." Two designs to write separately, then reconcile into one look.

iOS: wiring InputAccessoryView to a nativeID

iOS is straightforward. Give the InputAccessoryView a unique nativeID, pass the same value to the TextInput's inputAccessoryViewID, and the bar snaps onto the keyboard whenever that input is focused.

// IosAccessory.tsx — iOS only; renders nothing on Android
import { InputAccessoryView, TextInput, View, Pressable, Text, Keyboard } from "react-native";
 
const ACCESSORY_ID = "memo-toolbar";
 
export function MemoInputIOS() {
  return (
    <>
      <TextInput
        // links to the bar below via this ID
        inputAccessoryViewID={ACCESSORY_ID}
        placeholder="A quick memo"
        multiline
        style={{ minHeight: 96, padding: 12, fontSize: 16 }}
      />
 
      <InputAccessoryView nativeID={ACCESSORY_ID}>
        <View
          style={{
            flexDirection: "row",
            justifyContent: "space-between",
            alignItems: "center",
            paddingHorizontal: 12,
            height: 44,
            backgroundColor: "#f2f2f7",
            borderTopWidth: 0.5,
            borderTopColor: "#c6c6c8",
          }}
        >
          <Pressable onPress={() => {/* insert a snippet */}}>
            <Text style={{ fontSize: 16, color: "#007aff" }}>Snippet</Text>
          </Pressable>
          <Pressable onPress={() => Keyboard.dismiss()}>
            <Text style={{ fontSize: 16, fontWeight: "600", color: "#007aff" }}>Done</Text>
          </Pressable>
        </View>
      </InputAccessoryView>
    </>
  );
}

Run this on an iOS device and a gray bar appears at the top of the keyboard the moment you tap the field; tapping Done dismisses it together with the keyboard. Keyboard.dismiss() blurs the field and commits any pending IME characters there.

Open the same MemoInputIOS on Android, though, and the contents of InputAccessoryView are never drawn. No error, no warning — so at first you waste time suspecting your own styles. Android needs a different foundation.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦If the iOS InputAccessoryView shows up but Android renders nothing, you'll be able to make both platforms match with a single component
✦You'll get a copy-paste cross-platform implementation that covers keyboard-height measurement, safe-area overlap, and sharing one bar across several inputs
✦You'll turn 'the Done button disappears on Android' and 'the bar overlaps the home indicator' into stable behavior using a measurement hook and a small branch
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-09-04
EAS secret visibility does not keep a value out of your app — deciding prefix and visibility separately
The EXPO_PUBLIC_ prefix decides what ships inside your app; EAS visibility decides who can read it. Why stacking them blanks a value on OTA updates, and how to check your build.
⬡ Dev Tools2026-08-22
Every bulk replace exited zero. The damage was in the lines I did not delete
Run a bulk replace over generated code and the breakage lands on the neighbouring lines, not the matched ones. Here is what broke in a live project, and a dependency-free guard that checks the invariants a replace must preserve.
⬡ Dev Tools2026-07-30
What Renovate may bump in an Expo app, and what it must never touch
Turning on automated dependency updates in a Rork-generated app also hands Renovate the 123 packages Expo SDK 57 pins. Measured on 2026-07-30, six of them sit a full major version behind npm latest. Here is how to generate the ignore list from the SDK instead of maintaining it by hand.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links