Skip to main content

Overview

WindUI:CreateWindow(Config) is the entry point for every WindUI interface. It accepts a single configuration table and returns a Window object that exposes methods for managing the UI at runtime. Only one window can exist at a time. Calling CreateWindow a second time will print a warning and return nil.
local Window = WindUI:CreateWindow({
    Title  = "My Hub",
    Author = "by you",
    Folder = "myhub",
    Icon   = "house",
    Theme  = "Dark",
})

Config

Identity

Title
string
required
The window title displayed in the topbar.
Author
string
A subtitle rendered below the title in the topbar.
Icon
string
Icon name (Lucide icon key, e.g. "house") or a Roblox asset ID string. Also accepts Solar icon syntax, e.g. "solar:folder-2-bold-duotone".
IconSize
number
default:"22"
Pixel size of the topbar icon.
IconRadius
number
default:"0"
Corner radius applied to the icon image.
IconThemed
boolean
When true, the icon image is tinted with the current theme’s icon color.
Folder
string
Folder name used for config file storage (e.g. "myhub"). When set, WindUI creates WindUI/<Folder>/ and <Folder>/ on the filesystem. Required for config persistence and key saving.

Appearance

Theme
string
default:"\"Dark\""
Name of the theme to apply on creation. Must match a key in WindUI:GetThemes(). See Themes for all built-in names.
Radius
number
default:"16"
Corner radius (in pixels) for the window frame.
Transparent
boolean
When true, the window background is rendered semi-transparent.
Acrylic
boolean
Enables the acrylic (frosted glass) blur effect behind the window.
Background
string | table
Custom background for the window. Accepts:
  • A Roblox asset ID string — e.g. "rbxassetid://123456789"
  • An HTTPS image URL — downloaded and cached to <Folder>/assets/
  • "video:<url or rbxassetid>" — plays a looping video background
  • A gradient table returned by WindUI:Gradient(stops, props)
-- Solid asset
Background = "rbxassetid://123456789",

-- HTTPS image (downloaded on first run)
Background = "https://example.com/bg.png",

-- Looping video
Background = "video:rbxassetid://987654321",

-- Gradient
Background = WindUI:Gradient({
    ["0"]   = { Color = Color3.fromHex("#1a1a2e"), Transparency = 0 },
    ["100"] = { Color = Color3.fromHex("#16213e"), Transparency = 0 },
}, { Rotation = 90 }),
BackgroundImageTransparency
number
default:"0"
Transparency of the background image (0 = fully opaque, 1 = invisible).
ShadowTransparency
number
default:"0.6"
Transparency of the drop-shadow behind the window (0 = fully opaque shadow).
HidePanelBackground
boolean
When true, the subtle background panel behind the content area is hidden.
NewElements
boolean
Enables an alternate element style with rounder corners and adjusted padding.

Sizing

Size
UDim2
Initial window size. The offset values are clamped between MinSize and MaxSize. Defaults to UDim2.new(0, 580, 0, 460).
MinSize
Vector2
default:"Vector2.new(560, 350)"
Minimum pixel dimensions the window can be resized to.
MaxSize
Vector2
default:"Vector2.new(850, 560)"
Maximum pixel dimensions the window can be resized to.
Resizable
boolean
default:"true"
When true, a drag handle in the bottom-right corner lets the user resize the window.
AutoScale
boolean
default:"true"
Automatically scales the window down via UIScale so it fits within the viewport with a 40-pixel margin.

Layout

SideBarWidth
number
default:"200"
Pixel width of the left sidebar (tab list area).
When false (the default), a search bar is rendered at the bottom of the sidebar. Set to true to hide it.
The source default is HideSearchBar ~= false, meaning the search bar is shown by default. Pass HideSearchBar = true to hide it.
ScrollBarEnabled
boolean
When true, a custom scroll indicator is shown alongside the sidebar list.

Topbar

Topbar
table
Controls the topbar appearance.
Topbar = {
    Height      = 52,        -- height in pixels (default 52)
    ButtonsType = "Default", -- "Default" or "Mac"
}
FieldTypeDefaultDescription
Heightnumber52Topbar height in pixels.
ButtonsTypestring"Default""Default" places close/minimize/fullscreen on the right; "Mac" places colored dot buttons on the left.

Interaction

ToggleKey
Enum.KeyCode
Keyboard key that toggles the window open/closed.
ToggleKey = Enum.KeyCode.RightShift,

Open Button

OpenButton
table
Configures the floating button shown when the window is closed (mobile-friendly). Pass a table with any of the following fields:
OpenButton = {
    Title         = "Open Hub",
    CornerRadius  = UDim.new(1, 0),
    StrokeThickness = 3,
    Enabled       = true,
    Draggable     = true,
    OnlyMobile    = false,
    Scale         = 0.5,
    Color         = ColorSequence.new(
        Color3.fromHex("#30FF6A"),
        Color3.fromHex("#e7ff2f")
    ),
},

User Panel

User
table
Displays a user info panel at the bottom of the sidebar.
User = {
    Enabled   = true,
    Anonymous = false,          -- show "Anonymous" instead of real name
    Callback  = function()      -- called when the user clicks the panel
        print("user clicked")
    end,
},
FieldTypeDescription
EnabledbooleanWhether the panel is visible on creation.
AnonymousbooleanHides the real username/display name.
CallbackfunctionFired when the user clicks the panel.

Key System

KeySystem
table
Enables the key gate before the window opens. See the Key System page for full documentation.

Full Example

local Window = WindUI:CreateWindow({
    Title   = "My Script Hub",
    Author  = "by you",
    Folder  = "myhub",
    Icon    = "house",
    Theme   = "Dark",
    Size    = UDim2.fromOffset(680, 460),
    MinSize = Vector2.new(560, 350),
    MaxSize = Vector2.new(850, 560),

    ToggleKey  = Enum.KeyCode.RightShift,
    Resizable  = true,
    AutoScale  = true,
    NewElements = true,

    HideSearchBar = false,
    ScrollBarEnabled = false,
    SideBarWidth = 200,

    Topbar = {
        Height      = 44,
        ButtonsType = "Mac",
    },

    OpenButton = {
        Title    = "Open Hub",
        Enabled  = true,
        Draggable = true,
    },

    User = {
        Enabled  = true,
        Anonymous = false,
        Callback = function()
            print("user panel clicked")
        end,
    },
})

Methods

Visibility

Window:Open()       -- opens the window with animation
Window:Close()      -- closes the window with animation; returns a Close object
Window:Toggle()     -- opens if closed, closes if open
Window:Destroy()    -- closes then destroys all WindUI GUI instances
Window:Close() returns an object with a :Destroy() method. Window:Destroy() is shorthand for Window:Close():Destroy().

Appearance

Window:SetTitle("New Title")
Window:SetAuthor("by author")
Window:SetSize(UDim2.fromOffset(700, 500))
Window:SetUIScale(0.9)
Window:SetBackgroundImage("rbxassetid://123456789")
Window:SetBackgroundImageTransparency(0.4)
Window:SetPanelBackground(true)   -- true = visible, false = hidden
Window:ToggleFullscreen()         -- toggles fullscreen mode

Interaction

Window:SetToggleKey(Enum.KeyCode.RightControl)
Window:LockAll()    -- calls :Lock() on every element in the window
Window:UnlockAll()  -- calls :Unlock() on every element

Content

-- Create a tab in the sidebar
local Tab = Window:Tab({
    Title = "Main",
    Icon  = "house",
})

-- Create a section directly in the sidebar (wraps tabs)
local Section = Window:Section({
    Title = "My Section",
})

-- Add a topbar tag chip
Window:Tag({
    Title = "v1.0.0",
    Icon  = "github",
    Color = Color3.fromHex("#1c1c1c"),
    Border = true,
})

-- Add a divider line in the sidebar
Window:Divider()

-- Switch the active tab programmatically
Window:SelectTab(Tab)

Dialogs

Window:Dialog(Config) opens a modal dialog centered over the window.
Window:Dialog({
    Title   = "Confirm Action",
    Content = "Are you sure you want to proceed?",
    Width   = 320,    -- optional, default 320
    Buttons = {
        {
            Title    = "Cancel",
            Variant  = "Secondary",
            Callback = function() end,
        },
        {
            Title    = "Confirm",
            Variant  = "Primary",
            Callback = function()
                print("confirmed")
            end,
        },
    },
})

Open Button

-- Edit the floating open button at any time after creation
Window:EditOpenButton({
    Title   = "Open Hub",
    Enabled = true,
    Scale   = 0.6,
})

Callbacks

Window:OnOpen(function()
    print("window opened")
end)

Window:OnClose(function()
    print("window closed")
end)

Window:OnDestroy(function()
    print("window destroyed")
end)

Global WindUI methods

These methods are on the WindUI table and affect the entire interface, not just the window.
-- Change the global font for all elements
WindUI:SetFont("rbxassetid://12187365364")

-- Get the current window size
local size = WindUI:GetWindowSize()

-- Check if the window is transparent
local isTransparent = WindUI:GetTransparency()

-- Move all WindUI GUIs to a different parent
WindUI:SetParent(game.Players.LocalPlayer.PlayerGui)

Build docs developers (and LLMs) love