XLQP Gen1
ElementsContent & layout

AddBanner

Adds a prominent message surface with optional artwork and actions.

AddBanner

What it does

Adds a prominent message surface with optional artwork and actions.

When to use it

Use it for announcements, warnings, promotions, or any message that should stand out from normal page content.

ElementFunction:AddBanner(BannerConfig)

Controls:AddBanner({
    Name = "Developer Toolkit",
    Content = "Quick access to previews, tools and layout controls.",
    Image = "https://wallpapercave.com/wp/wp4575207.jpg",
    ImageTransparency = 0.05,
    Icon = "sparkles",
    Height = 118,
    Actions = {
        {Name = "Preview", Icon = "eye", IconOnly = true, Callback = function() print("Preview") end},
        {Name = "Tools", Icon = "pickaxe", IconOnly = true, Callback = function() print("Tools") end},
        {Name = "Expand tabs", Icon = "panel-left-open", IconOnly = true, Callback = function() Window:SetSidebarCollapsed(false) end},
        {Name = "Collapse tabs", Icon = "panel-left-close", IconOnly = true, Callback = function() Window:SetSidebarCollapsed(true) end}
    }
})

Behavior and return value

Call this method on the compatible section, tab, panel, or element container shown by the signature. Store the returned value when you need to update, read, or destroy the element later.

Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.