RORK LABJP
MAX — Rork Max builds native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR scanning, Metal 3D, widgets, Live Activities, HealthKit, and moreFUNDING — Rork raised $2.8M from a16z, now drawing 743k+ monthly visits at an 85% growth rateRN — Standard Rork generates iOS and Android apps together using React Native (Expo)FOCUS — Rork focuses solely on native mobile apps, setting it apart from web-first Bolt and LovablePRICING — Free to start, paid plans from $25/mo, with Rork Max at $200/mo and two-click App Store publishingMAX — Rork Max builds native Swift apps for iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and iMessageNATIVE — Rork Max unlocks AR/LiDAR scanning, Metal 3D, widgets, Live Activities, HealthKit, and moreFUNDING — Rork raised $2.8M from a16z, now drawing 743k+ monthly visits at an 85% growth rateRN — Standard Rork generates iOS and Android apps together using React Native (Expo)FOCUS — Rork focuses solely on native mobile apps, setting it apart from web-first Bolt and LovablePRICING — Free to start, paid plans from $25/mo, with Rork Max at $200/mo and two-click App Store publishing
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.

Rork477React Native191InputAccessoryViewKeyboardExpo124

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 $10 for lifetime access
View Membership →

Related Articles

Dev Tools2026-06-27
Before a Free Preview Walks Out via Screenshot: Detecting Screenshots and Screen Recording in Rork/Expo
How to protect paid preview images from screenshots and screen recording in a Rork/Expo app: the limits of expo-screen-capture, native isCaptured monitoring, and an iOS/Android-aware blur design.
Dev Tools2026-06-27
Catch Real-Device Bugs Before You Ship: A Pre-Submission Checklist for Rork Share Links
Rork's editor preview runs in an ideal environment, so it hides bugs that only appear on real hardware. Here are the seven device differences to clear before you hand out a share link, in the order to check them, with the code to set up first.
Dev Tools2026-06-26
Keep Audio Playing in the Background and Add Lock Screen Controls in a Rork App
How to make a Rork-generated Expo app keep playing music or healing sounds in the background and expose lock screen and Control Center controls, with working expo-audio code and the platform-specific gotchas.
📚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
See all →