# Size element

The size gui element doesn't add anything to the machine gui.

Instead it can be used to change the size of the gui.

The default machine gui size is 256x192px.

The maximum size is 3840x2160px.

Size elements are defined in json with `"type": "custommachinery:size"`.

{% hint style="warning" %}
You can only define 1 size element for a machine gui, if more than 1 size elements are added only the first will be used and the other ignored.
{% endhint %}

### Properties

The size element has 1 mandatory property and 2 optional properties :&#x20;

#### Mandatory property

```json5
"type": "custommachinery:size" //Mandatory to define a size element.
```

#### Optional properties

<details>

<summary>Width</summary>

#### Name : `width`

#### Description :&#x20;

A positive integer that define the width of the machine gui.

Maximum allowed value : 3840

#### Default : `256`

#### Example :&#x20;

```json5
"width": 512 //The machine gui will be 512px wide.
```

</details>

<details>

<summary>Height</summary>

#### Name : `height`

#### Description :&#x20;

A positive integer that define the height of the machine gui.

Maximum allowed value : 2160

#### Default : `192`

#### Example :&#x20;

```json5
"height": 512 //The machine gui will be 512px high.
```

</details>

### Example :&#x20;

A size gui element that resize the machine gui to 192x256px

```json5
{
    "type": "custommachinery:size",
    "width": 192,
    "height": 256
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frinn.gitbook.io/custom-machinery-1.19/creating-custom-machines/machine-gui/size-element.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
