# 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="/files/AzPsNRC0WAu7Chyg8Bob">/files/AzPsNRC0WAu7Chyg8Bob</a></td></tr><tr><td>Aqua</td><td><a href="/files/Ey3EXF4qUpy4TkrTLvNr">/files/Ey3EXF4qUpy4TkrTLvNr</a></td></tr><tr><td>Rose</td><td><a href="/files/NFBp1VFGEPB2uQJqixPo">/files/NFBp1VFGEPB2uQJqixPo</a></td></tr><tr><td>Light</td><td><a href="/files/REAXfZKs7UFGn43ze9bN">/files/REAXfZKs7UFGn43ze9bN</a></td></tr><tr><td>Dark</td><td><a href="/files/OxBG0cYUaWH6k8DbkDV1">/files/OxBG0cYUaWH6k8DbkDV1</a></td></tr><tr><td>Darker</td><td><a href="/files/Gww615Wn0MjEr52M0IOx">/files/Gww615Wn0MjEr52M0IOx</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](/fluent/fluent/setup.md) 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 %}


---

# 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://idontgiveaf.gitbook.io/fluent/components/window.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.
