> ## Documentation Index
> Fetch the complete documentation index at: https://gabibou-ui.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Public methods, lifecycle objects, defaults, and important limits.

This page maps the public API by object. See the [customization reference](https://gabibou-ui.mintlify.site/reference/customization.md) for defaults and ranges and the [icon catalogue](https://gabibou-ui.mintlify.site/reference/icon-catalogue.md) for all built-in IDs. Task-specific guides have complete examples: [controls](https://gabibou-ui.mintlify.site/customization/controls.md), [values](https://gabibou-ui.mintlify.site/customization/values-and-config.md), [loading](https://gabibou-ui.mintlify.site/customization/loading-screens.md), [key systems](https://gabibou-ui.mintlify.site/customization/key-systems.md), and [events](https://gabibou-ui.mintlify.site/customization/events-and-lifecycle.md).

## Library

For the short API, use `UI:CreateWindow("My project")`, `window:Tab("Home", "home")`, and `tab:Button("Hello", callback)`. Add an options table after the title when needed; value controls can take a callback after that table. The [controls walkthrough](https://gabibou-ui.mintlify.site/customization/controls.md) explains each control with a working example. Full options-table calls remain supported.

Button options include `Text`, `Description`, `Icon`, `IconVariant`, and `Variant`. `Variant` accepts `Primary` (default), `Secondary`, or `Subtle` to set the visual emphasis of an action. See the [button example](https://gabibou-ui.mintlify.site/customization/controls.md#button-run-an-action) for the options-table form.

| Method | Purpose |
| - | - |
| `UI:Create(spec)` | Validate and build a declarative window from root options plus `Tabs` and optional `Loading`. |
| `UI:CreateWindow(title, options?)` / `UI:CreateWindow(options)` | Create a window for step-by-step construction. |
| `UI:Design(optionsOrName)` | Validate and clone a design schema or return a fresh copy of a named design. |
| `UI:RegisterDesign(name, schema)` | Validate and register a reusable custom design schema. |
| `UI:GetDesignNames()` | Return a fresh list of built-in and registered design names. |
| `UI:UnregisterDesign(name)` | Remove a registered custom design; built-in presets are protected. |
| `UI:Launch(spec)` | Coordinate optional key gate, loading, startup steps, and window creation. |
| `UI:CreateLoader(options)` | Create a standalone loading screen. |
| `UI:CreateKeySystem(options)` | Create a standalone key-entry gate. |
| `UI:KeyProvider(name, options)` | Adapt a supported provider SDK or custom validator to the key gate's `Validate(key)` callback. |
| `UI:DestroyAll()` | Destroy all windows, key gates, loaders, and launch sessions owned by this library instance. |
| `UI:SetLayout(options)` | Set defaults for future windows. |
| `UI:SetStyle(options)` / `UI:SetMotion(options)` | Set style and animation defaults for future windows. |
| `UI:SetNotifications(options)` | Set toast defaults for future windows. |
| `UI:RegisterComponent(name, builder)` | Register a reusable custom control. |
| `UI:GetComponentNames()` / `UI:UnregisterComponent(name, expectedBuilder)` | List or remove custom component registrations. |
| `UI:GetIconNames()` / `UI:GetIconId(name)` / `UI:GetIconName(idOrName)` | Look up built-in and registered icons. |
| `UI:GetIconCatalogue()` / `UI:GetIconVariants()` | Return the icon catalogue or supported visual variants. |
| `UI:RegisterIcon(name, builder)` / `UI:UnregisterIcon(name, expectedBuilder)` | Register or safely remove an icon builder. |
| `UI:Icon(parent, idOrName, options)` | Draw an icon into a parent GUI object. |

## Window creation options

`CreateWindow` and the root of `Create`/`Launch` accept `Id`, `Title`, `Subtitle`, `Theme`, `Style`, `Motion`, `Branding`, `Layout`, `Notifications`, `Navigation`, `Responsive`, `Position`, `AnchorPoint`, `Width`, `Height`, `ToggleKey`, `ShowWatermark`, `DiscordPrompt`, `ReducedMotion`, `Parent`, `DisplayOrder`, and `Storage`. `DiscordPrompt` is disabled when omitted; setting it to an invite URL or options table opts in to showing the prompt after the window is created. `ShowWatermark` defaults to `true`; set it to `false` to hide the footer name and version while keeping the desktop hide-key hint and other actions. `Create` additionally accepts `Tabs` and `Loading`; `Launch` passes its root `DiscordPrompt` to the window it creates and adds `KeySystem`, `Loading`, `Steps`, `OnReady`, `OnError`, and `OnCancel`.

Window, loader, and key-gate constructors accept `Design` as a schema table or registered design name. Declarative `Create` and `Launch` pass it through to the surfaces they create. `UI:Design(options)` validates and clones an options table; `UI:Design(name)` returns a fresh copy of a built-in or registered schema. Built-in presets are `Studio`, `Minimal`, `Command`, and `Atelier`. Atelier uses a monochrome palette, Comfortable density, Balanced corners, Left tabs, Rail navigation, and `0.08` panel transparency. `RegisterDesign(name, schema)` accepts a schema table, rejects duplicate and built-in names with `false`, and returns `true` when registration succeeds. `GetDesignNames()` returns a fresh list with built-ins first and custom names in registration order. `UnregisterDesign(name)` removes registered names and returns a boolean; built-in names are protected. Names are exact and case-sensitive, valid UTF-8, 1–64 bytes, contain a non-whitespace character, and contain no control characters. Custom schemas use a built-in `Preset`; they cannot inherit from other custom designs. Preset values are starting values; explicit constructor `Theme`, `Style`, `Layout`, and `Navigation` options take precedence. The `Design` schema has `Preset`, `Accent`, `Transparency`, `Radius`, `Density`, `Tabs`, and `Navigation`. See the single-page [Design guide](https://gabibou-ui.mintlify.site/customization/design-your-interface.md) for exact values and complete examples.

Defaults include `Title = "Gabibou UI"`, `Theme = "Graphite"`, `Width = 800` (clamped to 320–1400), `Height = 590` (clamped to 300–1000), `ToggleKey = Enum.KeyCode.RightControl`, and `DisplayOrder = 90`. The default GUI parent is the local player's `PlayerGui`. `Responsive` defaults are `Breakpoint = 620`, `TouchTarget = 44`, and `Margin = 12`.

`Tabs` is a dense, nonempty array. Each tab needs a nonempty `Title` and accepts `Category` (a category title string), `Icon`, `IconVariant`, `Layout`, `Controls`, and `Sections`. Tabs with the same `Category` title share a heading. Each section has a `Title` and optional `Controls`. Each declarative control requires a unique, nonempty `Id` (maximum 96 characters, without control characters).

## Window methods

| Method | Purpose |
| - | - |
| `Tab(title, iconOrOptions?)` / `Tab(options)`, `SelectTab(tab)` | Add or select a tab. |
| `Category(titleOrOptions)` | Get or create a named tab category. A category options table accepts `Title`; repeated calls for the same title return the same category. |
| `Appearance(options?)` | Add an optional editor tab for theme, accent, transparency, navigation and motion. Accepts `Title`, an icon name or ID in `Icon`, and an optional control-ID prefix in `Id`. Returns the tab; its controls are nonpersistent. See [the design guide](https://gabibou-ui.mintlify.site/customization/design-your-interface.md). |
| `Command(options)`, `RemoveCommand(id)`, `OpenCommands()`, `CloseCommands()` | Register actions and open or close a searchable palette. Registration returns a removable handle. See [Commands and presets](https://gabibou-ui.mintlify.site/customization/commands-and-presets.md). |
| `Presets(options?)`, `SavePreset(name)`, `LoadPreset(name, fireCallbacks?)`, `DeletePreset(name)`, `GetPresetNames()` | Add a profiles editor or manage snapshots in code. Session memory is the default; `StorageKey` opts into the window's configured Read/Write adapter. |
| `SearchFor(query)` | Apply a search query to controls. |
| `Get(id)`, `GetValues()`, `SetValues(values, fireCallbacks)` | Read controls and persistent values. |
| `Hide()`, `Show()`, `Toggle()` | Change window visibility. |
| `SetSize(width, height)`, `SetPosition(position, anchor)` | Set the window dimensions or position. |
| `SetTheme(value)`, `SetStyle(options)`, `SetMotion(options)`, `SetReducedMotion(enabled)` | Update appearance and managed animation behavior. |
| `SetWatermark(enabled)` | Show or hide the footer name and library version. |
| `PromptDiscord(urlOrOptions)` | Immediately open an optional Discord invite prompt; returns `true` if it opens, otherwise `false, reason`. |
| `SetLayout(options)`, `SetNavigation(options)`, `SetBranding(options)` | Update layout and navigation settings. |
| `SetNotifications(options)`, `Notify(options)`, `Confirm(options)` | Configure or show feedback UI. |
| `ExportConfig()`, `ImportConfig(json, fireCallbacks)`, `SaveConfig(name)`, `LoadConfig(name, fireCallbacks)` | Export and restore persistent values. |
| `GetParts()`, `SetPartLayout(name, options)`, `ResetPartLayout(name)` | Access and reposition named GUI parts. |
| `Animate(instance, properties, options)`, `BindColor(instance, property, token)` | Manage animations and theme-bound colors. |
| `On(name, callback)`, `Connect(signal, callback)`, `Own(resource)`, `OnDestroy(callback)` | Subscribe and register owner-scoped cleanup. |
| `Destroy()` | Release the window and its owned UI resources. |

## Category methods

`window:Category("General")` and `window:Category({Title = "General"})` get or create a category. `category:Tab(title, iconOrOptions?)` adds a tab to it. A tab can also declare `Category = "General"` in `window:Tab({Title = "Home", Category = "General"})` or in a declarative `Create` tab spec; a matching category is reused or created automatically.

| Method | Purpose |
| - | - |
| `Tab(title, iconOrOptions?)` / `Tab(options)` | Add a tab to this category. |
| `SetTitle(title)` | Rename the category heading. |
| `Destroy()` | Destroy this category and all of its tabs. |

## Control and section methods

Create built-in controls with `Toggle`, `Slider`, `Dropdown`, `Input`, `Keybind`, `ColorPicker`, `Button`, `Paragraph`, or `Custom` on a section or tab. `tab:Section({Title = "..."})` creates a section; `section:Add(name, options)` creates a registered component.

Controls expose `Get`, `Set(value, fireCallback)`, `SetTitle`, `SetDescription`, `SetVisible`, `SetEnabled`, `SetLayout`, `SetOrder`, `GetParts`, `Animate`, `On`, `Connect`, `Own`, and `Destroy`. Custom controls additionally expose `SetHeight`. `ColorPicker` exposes `GetColor()`.

## Key gate

`UI:KeyProvider(name, options)` returns a `Validate(key)` callback for `CreateKeySystem` or `Launch`. Provider names are case-insensitive: `Luarmor`, `Vampauth`, `KeyAuth`, and `Custom`. SDK objects and callbacks are supplied explicitly; this method does not load third-party code. See [provider examples](https://gabibou-ui.mintlify.site/examples/key-providers.md) for exact option shapes.

| Provider | Options | Acceptance |
| - | - | - |
| `Luarmor` | `{SDK = api, ScriptId = "..."}` | `api.check_key(key)` returns a table whose `code` is exactly `KEY_VALID`. |
| `Vampauth` | `{SDK = Vampauth, ProjectId = "...", AuthSecret = "...", HWID? = "..."}` | `Vampauth.new({projectId, authSecret, hwid?})` creates a client; `client:Check(key)` returns `true, result` or `false, reason`. |
| `KeyAuth` | `{Initialize = function() ..., License = function(key, context) ... end}` | Initialization returns `true, context` or `{success = true, context = ...}`; license validation returns a boolean plus result/message or a table with boolean `success`. |
| `Custom` | `{Validate = function(key) ... end}` | Uses the supplied validator directly. |

The Luarmor adapter reserves each SDK table for one `ScriptId`: the same table may be reused for that same ID, but a different ID needs a different SDK instance. It also fails closed if `sdk.script_id` changes after the provider is created. Provider errors fail closed and are converted to retryable status messages. KeyAuth initialization is lazy, shared across concurrent checks made through that provider callback, and retried after a failed initialization. Keep the `Validate` function's result contract: `true, result` accepts; `false, message` rejects. A client-side gate is not an authorization boundary; check protected actions on a trusted server.

`UI:CreateKeySystem(options)` requires `Validate(key)` and optionally accepts `OnSuccess(gate, result)`, `OnCancel(gate)`, and `GetKey`. `GetKey` can be an HTTPS URL/string, `{Url, Text, Copy}`, a custom `function(gate)`, or `false` to disable. `gate:GetKey()` runs a single-flight key-link/custom action and returns a success boolean plus optional reason. It exposes `Submit(key)`, `Cancel()`, `Destroy()`, `Update(options)`, `GetParts()`, `SetPartLayout(name, options)`, `ResetPartLayout(name)`, `CopyDiscordLink()`, and `GetKey()`. `GetParts()` includes `CredentialWell`, `GetKeyButton`, `KeyLink`, and `KeyLinkStatus`. Layout methods accept named parts from `GetParts()` except the fixed `Overlay` and `Card`; options are `Position`, `Size`, `AnchorPoint`, and `Visible`. Overrides persist across responsive reflow and `Update`. For parts inside the scroll content, a finite vertical extent is required; moved content expands the scroll area to keep it reachable. Custom positions can overlap other controls. See the [Design guide](https://gabibou-ui.mintlify.site/customization/design-your-interface.md) for a short example.

Default `Logo` is `"Avatar"`; set it to `false` to show `MarkText`, or use an `rbxassetid://` URI. Default `SubmitText` is `Verify key`. Width defaults to 420 px (range 280–600). Automatic card heights are 332 px without Discord/GetKey, 394 px with Discord, 404 px with GetKey, and 462 px with both; `Height` accepts 280–560 px. See [Key systems](https://gabibou-ui.mintlify.site/customization/key-systems.md) for link behavior, Discord, and validation details.

## Discord prompt

`window:PromptDiscord(urlOrOptions)` opens a community invite modal immediately. It accepts a code, `https://discord.gg/{code}`, or `https://discord.com/invite/{code}`; accepted links normalize to `https://discord.gg/{code}`. It returns `true` when opened or `false, reason` when unavailable, already open, or already shown for that invite during this library instance. The root `DiscordPrompt` option opts in to showing it after window creation; `Launch` passes that option to its window.

Options are `Url` (required), `Title`, `Content`, `JoinText`, `ContinueText`, `Copy(url)`, `Open(url)`, and `OncePerSession`. Defaults are `Title = "Join the community"`, `Content = "Join the Gabibou UI community for updates and help."`, `JoinText = "Copy invite"`, `ContinueText = "Not now"`, and `OncePerSession = true`. A supplied `Open` or `Copy` callback runs only after the corresponding user action; callback results of `nil` or `true` signal success. `false` or a thrown error keeps the dialog open and leaves the normalized invite available for manual copying. Without a callback, the existing clipboard function is used when available; in Studio the link remains selectable for manual copying. The modal never opens a browser or joins a server by itself. `OncePerSession` is in-memory only and can be set to `false` to show the same invite again. The fixed modal credit is `Gabibou UI · by Gabibou`, independent of `ShowWatermark`. See [Discord prompt examples](https://gabibou-ui.mintlify.site/examples/discord-prompt.md) and [Notifications and confirmation](https://gabibou-ui.mintlify.site/customization/notifications.md).

## Loader

`UI:CreateLoader(options)` exposes `SetProgress`, `SetStatus`, `Update`, `Run`, `GetParts`, `SetPartLayout`, `ResetPartLayout`, `Own`, `Complete`, and `Destroy`. `GetParts()` includes `StatusPanel`, which can be positioned or resized with `SetPartLayout`. Fields include `Progress`, `Status`, `Completed`, `Destroyed`, and `LastError`. See [Loading screens](https://gabibou-ui.mintlify.site/customization/loading-screens.md) for variant and content customization.

## Launch session

`UI:Launch(spec)` returns a session with `Status`, `LastError`, `Gate`, `Loader`, `Window`, `Cancel()`, and `Destroy()`. Status values are `WaitingForKey`, `Loading`, `Ready`, `Failed`, and `Destroyed`. Callbacks are `OnReady(window, session)`, `OnError(message, session)`, and `OnCancel(session)`.

## Theme tokens and motion fields

Theme names are `Graphite`, `Aurora`, and `Ember`. Theme tokens are `Background`, `Surface`, `Raised`, `Hover`, `Border`, `Text`, `Muted`, `Accent`, `AccentText`, `Success`, and `Danger`.

Style fields are `Font`, `FontBold`, `TextSize`, `DescriptionSize`, `TitleSize`, `WindowRadius`, `SectionRadius`, `ControlRadius`, and `RowPadding`. Motion fields are `Duration`, `Style`, `Direction`, `RepeatCount`, `Reverses`, and `Delay`. See [Appearance and layout](https://gabibou-ui.mintlify.site/customization/appearance-and-layout.md) for behavior and ranges.

## Configuration limits

* Input length defaults to 120; supported maximum is 4096.
* Key input defaults to 256 UTF-8 characters; supported maximum is 4096.
* Persistent configuration JSON is limited to 256 KiB.
* The library uses no implicit filesystem adapter. Pass `Storage.Read` and `Storage.Write` when saving profiles.
* Custom interface builders can have side effects that schema validation cannot predict. A failed build cleans up the new partial window but does not restore a same-ID window that was already replaced.


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