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

# ViewportOptions

> Viewport settings a client application is created with.

Defined in: [packages/common/src/viewport/viewport.type.ts:17](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/viewport/viewport.type.ts#L17)

Viewport settings a client application is created with.

## Remarks

When `width`/`height` are omitted, the design resolution is 1920x1080.

## Properties

### background?

> `optional` **background?**: `string`

Defined in: [packages/common/src/viewport/viewport.type.ts:42](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/viewport/viewport.type.ts#L42)

CSS background of the container, visible behind the canvas and in the
letterbox bars.

#### Default

```ts theme={null}
"black"
```

***

### fit?

> `optional` **fit?**: [`ViewportFit`](https://docs.nanoforge.eu/references/engine/3.0.0/common/type-aliases/ViewportFit)

Defined in: [packages/common/src/viewport/viewport.type.ts:35](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/viewport/viewport.type.ts#L35)

How the design resolution is fitted into the container.

#### Default

```ts theme={null}
"contain"
```

***

### height?

> `optional` **height?**: `number`

Defined in: [packages/common/src/viewport/viewport.type.ts:29](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/viewport/viewport.type.ts#L29)

Design (game-unit) height.

#### Default

```ts theme={null}
1080
```

***

### width?

> `optional` **width?**: `number`

Defined in: [packages/common/src/viewport/viewport.type.ts:23](https://github.com/NanoForge-dev/Engine/blob/ed8c7e0b33d17f8343c32659cf63ba4166a4fa53/packages/common/src/viewport/viewport.type.ts#L23)

Design (game-unit) width.

#### Default

```ts theme={null}
1920
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.