Skip to main content

BaseButton

A barebones button component, like if Roblox had a "Button" class rather than only a TextButton.

Types

BaseButtonProps

interface BaseButtonProps {
...BaseProps--

All Base properties are accepted.

Disabledboolean?--

Whether the button is disabled.

OnActivate(() → ())?--

Callback for when the button is activated.

OnHover(() → ())?--

Callback for when the button is hovered over.

OnHoverEnd(() → ())?--

Callback for when the hover ends.

OnHold(() → ())?--

Callback for when the button is held.

OnHoldEnd(() → ())?--

Callback for when the hold ends.

Hoveringboolean?--

Whether the button is currently being hovered over.

Holdingboolean?--

Whether the button is currently being held.

HoverSoundSound?--

The sound to play when the button is hovered over.

ClickSoundSound?--

The sound to play when the button is clicked.

}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "BaseButtonProps",
            "desc": "",
            "fields": [
                {
                    "name": "...",
                    "lua_type": "BaseProps",
                    "desc": "All Base properties are accepted."
                },
                {
                    "name": "Disabled",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is disabled."
                },
                {
                    "name": "OnActivate",
                    "lua_type": "(() -> ())?",
                    "desc": "Callback for when the button is activated."
                },
                {
                    "name": "OnHover",
                    "lua_type": "(() -> ())?",
                    "desc": "Callback for when the button is hovered over."
                },
                {
                    "name": "OnHoverEnd",
                    "lua_type": "(() -> ())?",
                    "desc": "Callback for when the hover ends."
                },
                {
                    "name": "OnHold",
                    "lua_type": "(() -> ())?",
                    "desc": "Callback for when the button is held."
                },
                {
                    "name": "OnHoldEnd",
                    "lua_type": "(() -> ())?",
                    "desc": "Callback for when the hold ends."
                },
                {
                    "name": "Hovering",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is currently being hovered over."
                },
                {
                    "name": "Holding",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is currently being held."
                },
                {
                    "name": "HoverSound",
                    "lua_type": "Sound?",
                    "desc": "The sound to play when the button is hovered over."
                },
                {
                    "name": "ClickSound",
                    "lua_type": "Sound?",
                    "desc": "The sound to play when the button is clicked."
                }
            ],
            "source": {
                "line": 23,
                "path": "src/Components/BaseButton.luau"
            }
        }
    ],
    "name": "BaseButton",
    "desc": "A barebones button component, like if Roblox had a \"`Button`\" class rather than only a `TextButton`.",
    "source": {
        "line": 6,
        "path": "src/Components/BaseButton.luau"
    }
}