Skip to main content

The Viewport object

Classic apps

You're viewing documentation for classic apps, which use Retool's original app editor. The new app builder is the recommended way to build apps and where Retool focuses new development.

Properties

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

height

The height of the canvas. This value increases as the layout increases vertically and includes content that must be scrolled into view.

Type number
Format Integer
Configurability Read-only
Defaultnull
Examples
false"200"

width

The width of the canvas. This value is responsive to the horizontal space available.

Type number
Format Integer
Configurability Read-only
Defaultnull
Examples
false1280