XLQP Gen1
ElementsControls

AddSmoothToggle

Adds an animated boolean toggle with optional live-color styling.

AddSmoothToggle

What it does

Adds an animated boolean toggle with optional live-color styling.

When to use it

Use it for on/off settings when you want a more expressive transition than a basic checkbox.

ElementFunction:AddSmoothToggle(SmoothConfig)

Controls:AddSmoothToggle({
    Name = "Smooth Live Toggle",
    Description = "Animated left and right switch",
    Default = true,
    LiveColor = "Cold Heat",
    Flag = "SmoothLiveToggle",
    Callback = function(value)
        print("Smooth toggle", value)
    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.