By default, iframes have a fixed height, which can lead to nested scrollbars. The Page module provides tools to dynamically adjust the iframe height to match your content perfectly.Usage#
Automatic Resizing (Recommended)#
API Reference#
Methods#
| Method | Parameters | Description |
|---|
autoResize() | - | Sets up a ResizeObserver to watch the app's body height and sync it with the host. |
resize(height) | height: number | Manually sets the iframe height to a specific pixel value. |
resize() Parameters#
| Parameter | Type | Required | Description |
|---|
| height | number | Yes | The height in pixels. Must be a non-negative number. |
Init with AutoResize: It's a good practice to call autoResize() during your initial bootstrap flow.
Avoid Over-Resizing: Ensure your app doesn't have height: 100vh on the body, as this can interfere with calculations.
Modified at 2026-02-02 10:34:37