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:
| Property | Type | Description |
|---|---|---|
autoButtonColor | boolean | Whether Roblox tints the button automatically. |
modal | boolean | Whether the button is modal. |
selected | boolean | Selection state. |
style | Enum.ButtonStyle | Button style. |
Events
In addition to the shared widget events:
| Event | Signature |
|---|---|
Activated | (obj: InputObject, clickCount: number) -> () |
SecondaryActivated | (obj: InputObject) -> () |