Skip to main content
Developer DemoDisplay our demo page in your app to test during development https://median.dev/keyboard/

Implementation guide

Use the Median JavaScript Bridge to get or listen for the keyboard state.

Get current keyboard state

Retrieve the current visibility status and size of the on-screen keyboard. This method accepts an optional callback function. If no callback is provided, a Promise is returned.

Subscribe to keyboard state changes

Automatically listen for changes in keyboard visibility and dimensions. Define a handler function to receive updates whenever the keyboard appears, disappears, or resizes.

Example: hide bottom navigation when keyboard is visible

The following code hides the bottom tab bar when the keyboard appears and restores it when the keyboard is dismissed. This can be useful to preserve screen space for large forms.

Toggle accessory view (iOS only)

On iOS devices, the software keyboard may display an accessory view containing spell check and formatting tools. Use this method to enable or disable the accessory view as needed.

Demo app

Last modified on November 7, 2026