# Window

The window can be created here. It's needed for the main part of Fluent.

<pre class="language-lua"><code class="lang-lua">local Window = Fluent:CreateWindow({
<strong>    Title = "Fluent " .. Fluent.Version,
</strong>    SubTitle = "by .idontgiveaf",
    TabWidth = 160,
    Size = UDim2.fromOffset(580, 460),
    Acrylic = true, -- Turns off and on blur in case it's detected
    Theme = "Dark",
    MinimizeKey = Enum.KeyCode.LeftControl -- Used when there's no MinimizeKeybind
})
</code></pre>

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Amethyst</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2FLk1AheOLPJMymc3lcOlj%2Fimage.avif?alt=media&#x26;token=811d0801-2eff-4128-958f-c748f9435b00">image.avif</a></td></tr><tr><td>Aqua</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2F3T3a3LnPOIxOyDLFM8j1%2Fimage1.avif?alt=media&#x26;token=b8ec528c-7e55-4d7e-bc72-dc3511bdb51f">image1.avif</a></td></tr><tr><td>Rose</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2FXgZIEuPO95Lce4kNzThT%2Fimage%202.avif?alt=media&#x26;token=af21eba6-0adf-4a87-9d52-e75538620e29">image 2.avif</a></td></tr><tr><td>Light</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2FRzOMQvV9F3CBGpS068WI%2Fimage%203.avif?alt=media&#x26;token=7372a6ff-68f5-43b4-97f1-b2f545392564">image 3.avif</a></td></tr><tr><td>Dark</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2FG7RVRxIPvWcXUJWWhcoL%2Fimage%204.avif?alt=media&#x26;token=a97113b4-7f18-496c-99ce-c21a15f3dd4b">image 4.avif</a></td></tr><tr><td>Darker</td><td><a href="https://885147684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FayUDyWxH0rY74xomJwB0%2Fuploads%2FJM2erXTTmHzm0FcWh0Vu%2Fimage%205.avif?alt=media&#x26;token=d36599c2-734f-457b-b80e-5cf9535fe5d8">image 5.avif</a></td></tr><tr><td>Green</td><td></td></tr></tbody></table>

If you need to run code when the GUI closes, connect the window to a destroyed connection.

```lua
Window.Root.Destroying:Connect(function()
    print("Window Destroyed!")
end)
```

### Functions

{% tabs %}
{% tab title="Select" %}
To select a tab, use this.&#x20;

This is used to load into a script with a specific tab number.

Window:SelectTab(1) -- Tab Number
{% endtab %}

{% tab title="Minimize" %}
The window can be minimized without pressing the button.

<pre class="language-lua"><code class="lang-lua"><strong>Window:Minimize()
</strong></code></pre>

If you dislike notifications, you can also do it manually.

```lua
Window.Minimized = not Window.Minimized
Window.Root.Visible = not Window.Minimized
```

{% endtab %}

{% tab title="Maximize" %}
To maximize, use this function.

```lua
Window:Minimize()
```

{% endtab %}

{% tab title="Destroy" %}
To destroy, use this function.

```lua
Window:Destroy()
```

This only destroys the window. To destroy the library, go to [setup](https://idontgiveaf.gitbook.io/fluent/fluent/setup "mention") for the function.
{% endtab %}

{% tab title="Add Tab" %}
If you want to add another tab, use this function.&#x20;

This function is normally used in the Tabs variable.

```lua
Window:AddTab({ Title = "Example", Icon = "" })
```

{% endtab %}
{% endtabs %}
