Skip to content

ImageButton ​

A clickable image. Maps to Roblox ImageButton.

luau
PeanutUI.ImageButton {
    imageContent = "rbxassetid://123456",
    Activated = function()
        print("clicked")
    end,
}

Properties ​

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

PropertyTypeDescription
hoverImagestringImage shown on hover.
pressedImagestringImage shown while pressed.
autoButtonColorbooleanWhether Roblox tints the button automatically.
modalbooleanWhether the button is modal.
selectedbooleanSelection state.

Events ​

In addition to the shared widget events:

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