ElementsControls
CreateCopyButton
Creates a button that copies a configured value.
CreateCopyButton
What it does
Creates a button that copies a configured value.
When to use it
Use it beside codes, identifiers, commands, or URLs that users frequently copy.
ElementFunction:CreateCopyButton(CopyConfig)
local CopyInvite = LeftGroup:CreateCopyButton({
Name = "Copy Discord Invite",
Description = "Copies the current invite in one click.",
Icon = "link",
Value = "https://discord.gg/QEW8ap3MuV",
Callback = function(value, success)
print("copy invite", value, success)
end
})Behavior and return value
Store the returned controller or object when later code needs to update its state, call its methods, or close it.
Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.