---
schema_version: "1"
id: 63ef4473d14331fbb491f223f2fe2757815836af0b589f6922c8a3810ac682bc
title: Dimensions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/canvas-framework/guides/platform-connect/reference/dimensions-object.md
canonical_url: https://developer.salesforce.com/docs/platform/canvas-framework/guide/dimensions-object.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 43a55055c2beabcef43cd6afabc44f6dece3876539039b1a8ac406f637f3e0d7
products:
  - Canvas Developer Guide
  - Platform Developer Content
---

# Dimensions

The Dimensions object is a JSON-formatted object containing context information about dimensions of the iFrame on which the canvas app appears.

|Field|Description|
|-----|-----------|
|`clientHeight`|The values of `clientHeight` are sent to the canvas app within SignedRequest and can be used to set the height of the outermost `div` element. This field is useful for setting the height of an app that’s accessed from a mobile device. The field can be referenced as `sr.context.environment.dimensions.clientHeight`, where `sr` is the parsed signed request JavaScript object.|
|`clientWidth`|The values of `clientWidth` are sent to the canvas app within SignedRequest and can be used to set the width of the outermost `div` element. This field is useful for setting the width of an app that’s accessed from a mobile device. The field can be referenced as `sr.context.environment.dimensions.clientWidth`, where `sr` is the parsed signed request JavaScript object.|
|`height`|The height of the iFrame in pixels.|
|`width`|The width of the iFrame in pixels.|
|`maxHeight`|The maximum height of the iFrame in pixels. Defaults to 2,000; “infinite” is also a valid value.|
|`maxWidth`|The maximum width of the iFrame in pixels. Defaults to 1,000; “infinite” is also a valid value.|

The following code snippet shows an example of the Dimensions object.

```nolang
"dimensions": 
{ 

    "clientHeight": "50px", 
    "clientWidth": "70px", 
    "height": "900px", 
    "width": "800px", 
    "maxHeight": "2000px", 
    "maxWidth": "1000px" 
}, 

```

**See Also**  


-   [Environment](https://developer.salesforce.com/docs/platform/canvas-framework/guide/environment-object.md)
-   [User Interface Considerations](https://developer.salesforce.com/docs/platform/canvas-framework/introducing/canvas-app-ui-considerations.md)

