Keyboard Viewport Resizing Demo
The interactive-widget viewport parameter lets you specify how the page should behave when the on-screen keyboard is displayed.
Demo
- Install the app on your Android phone.
- Tap one of the buttons below to change the viewport interactive-widget parameter.
- 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:
- resizes-visual → The keyboard resizes the viewport but elements with a fixed position stay where they are (default).
- resizes-content → The keyboard resizes the viewport, including elements with a fixed position.
- overlays-content → The keyboard overlays the viewport, and nothing in the page is resized or moved.
Code
Links & Documentation
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