Skip to content

TextButton ​

A clickable text button. Maps to Roblox TextButton.

luau
PeanutUI.TextButton {
    text = "Click me",
    Activated = function()
        print("clicked")
    end,
}

Properties ​

In addition to the shared widget properties and all TextLabel properties:

PropertyTypeDescription
autoButtonColorbooleanWhether Roblox tints the button automatically.
modalbooleanWhether the button is modal.
selectedbooleanSelection state.
styleEnum.ButtonStyleButton style.

Events ​

In addition to the shared widget events:

EventSignature
Activated(obj: InputObject, clickCount: number) -> ()
SecondaryActivated(obj: InputObject) -> ()