PWA Demos
Viewport Resizing

Keyboard Viewport Resizing Demo

The interactive-widget viewport parameter lets you specify how the page should behave when the on-screen keyboard is displayed.

Viewport Resizing Logo

Demo

  1. Install the app on your Android phone.
  2. Tap one of the buttons below to change the viewport interactive-widget parameter.
  3. Tap the input field below to bring up the keyboard and see how the viewport reacts.

How it works

The viewport: interactive-widget parameter is only compatible with Chrome on Android. It lets you choose one of three options to control how the viewport behaves when an interactive widget partially covers it:

  1. resizes-visual → The keyboard resizes the viewport but elements with a fixed position stay where they are (default).
  2. resizes-content → The keyboard resizes the viewport, including elements with a fixed position.
  3. overlays-content → The keyboard overlays the viewport, and nothing in the page is resized or moved.

Code

Links & Documentation

Your app here

Ready to generate your PWA?

Try our PWA toolkit free of charge and without limits for 14 days. No credit card required.

Generate PWA See plans