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
| Object | Created with | Contains |
|---|---|---|
| Library | Loader result | Windows and shared library behavior |
| Window | Library:MakeWindow(config) | Tabs, navigation, popups, sidebar state |
| Tab | Window:MakeTab(config) | Sections, tab boxes, panels, elements |
| Section | Tab:AddSection(config) | Interactive and display elements |
| Element | Section: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.
Callbackreceives user interaction.- The returned controller changes the element after creation.
Shared options
Options differ by element, but these names are used throughout the library.
| Option | Meaning |
|---|---|
Name | Visible title or identifier |
Description / Content | Supporting text |
Default | Initial value |
Callback | Function called when the value or action changes |
Flag | Stable configuration key |
Save | Persists a supported control when window config is enabled |
Locked | Prevents interaction |
Icon / Image | Optional icon or Roblox asset |
Color | Element accent |
Height / Width | Explicit dimensions where supported |
Moveable | Enables element movement where supported |
Premium | Marks a restricted/premium element where supported |
TextColor | Overrides element text with a named color, hex value, RGB table, or Color3 |
Style | Overrides the element surface, stroke, radius, height, and text styling |
LockedTo | Limits 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 = resultValidate remote data before passing it to tables, plugins, chat, or executable code elements. Keep privileged network operations server-side whenever possible.
MakePopup
This compatibility method behaves like CreatePopup. Creates a modal popup with a title, description, and action options. It is kept so scripts written with the older MakePopup name continue to work.
New window and runtime APIs
Widgets, dialogs, admin and private tabs, dynamic-island notifications, media center, tab styling, and parameter introspection.