> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extractbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# setViewport

Sets the viewport size for the current page.
Example: `setViewport(viewport: { width: 1280, height: 720 })`
Returns true if the viewport was successfully set.

## Definition

```graphql theme={null}
setViewport(
  viewport: ViewportOptions!
): Boolean!
```

## Arguments

### `viewport`

[ViewportOptions!](/reference/graphql/inputs/viewport-options)

The viewport dimensions (width and height) to set.

## Returns

[Boolean!](/reference/graphql/scalars/boolean)

The `Boolean` scalar type represents `true` or `false`.
