XLQP Gen1
Reference

Library reference

Understand constructors, configuration tables, callbacks, flags, and the XLQP object hierarchy.

Library reference

XLQP uses a small set of repeatable conventions. Once you understand constructors, configuration tables, and controllers, every element behaves predictably.

Object hierarchy

ObjectCreated withContains
LibraryLoader resultWindows and shared library behavior
WindowLibrary:MakeWindow(config)Tabs, navigation, popups, sidebar state
TabWindow:MakeTab(config)Sections, tab boxes, panels, elements
SectionTab:AddSection(config)Interactive and display elements
ElementSection:AddToggle(config), etc.State, visuals, callbacks, controller methods

Constructor pattern

local Controller = Container:AddElement({
    Name = "Visible label",
    Default = false,
    Callback = function(value)
        print(value)
    end,
})
  • The method name selects the element.
  • The table configures initial appearance and behavior.
  • Callback receives user interaction.
  • The returned controller changes the element after creation.

Shared options

Options differ by element, but these names are used throughout the library.

OptionMeaning
NameVisible title or identifier
Description / ContentSupporting text
DefaultInitial value
CallbackFunction called when the value or action changes
FlagStable configuration key
SavePersists a supported control when window config is enabled
LockedPrevents interaction
Icon / ImageOptional icon or Roblox asset
ColorElement accent
Height / WidthExplicit dimensions where supported
MoveableEnables element movement where supported
PremiumMarks a restricted/premium element where supported
TextColorOverrides element text with a named color, hex value, RGB table, or Color3
StyleOverrides the element surface, stroke, radius, height, and text styling
LockedToLimits element visibility to selected user IDs or names

Callbacks

Use callbacks for user-driven behavior. Keep them short; call a separate function for heavier work.

local function updateSpeed(value)
    local character = game.Players.LocalPlayer.Character
    local humanoid = character and character:FindFirstChildOfClass("Humanoid")

    if humanoid then
        humanoid.WalkSpeed = value
    end
end

Section:AddSlider({
    Name = "Walk speed",
    Min = 16,
    Max = 100,
    Default = 16,
    Increment = 1,
    Callback = updateSpeed,
})

Flags and saving

local Window = Library:MakeWindow({
    Branding = { Name = "My Hub" },
    Config = {
        Enabled = true,
        Folder = "MyHub",
    },
})

Section:AddToggle({
    Name = "Notifications",
    Default = true,
    Flag = "notifications_enabled",
    Save = true,
})

Choose unique, stable flags. Renaming a visible Name is safe; changing a saved Flag creates a new saved value.

Controller pattern

local Status = Section:AddStatusBox({
    Title = "Connection",
    Content = "Connecting…",
    Variant = "warning",
})

task.spawn(function()
    local connected = connectToService()

    if connected then
        Status:SetStatus("success")
        Status:SetContent("Connected")
    else
        Status:SetStatus("error")
        Status:SetContent("Could not connect")
    end
end)

Controller methods are element-specific. See Controllers for a compact list.

Parameter discovery

For the new key-system helpers, AI agent methods, macros, music-title helpers, and GetRuntimeHealth(), see Current API additions, Key system, and AI agent.

The current source can describe every registered constructor at runtime.

local Names = Library:GetElementParameterNames()
local ToggleInfo = Library:GetElementParameters("AddToggle")
local AllInfo = Library:GetAllElementParameters()
print(Library:FormatElementParameters("AddToggle"))

local Toggle = Section:AddToggle({ Name = "Enabled" })
print(Toggle.Parameters)
print(Toggle:GetParameters())

See New window and runtime APIs for widgets, dialogs, private tabs, admin tabs, media center, and dynamic-island notifications.

Defensive usage

local ok, result = pcall(function()
    return Library:MakeWindow({
        Branding = { Name = "My Hub" },
    })
end)

if not ok then
    warn("XLQP could not initialize:", result)
    return
end

local Window = result

Validate remote data before passing it to tables, plugins, chat, or executable code elements. Keep privileged network operations server-side whenever possible.