Skip to main content

Button

A robust button component, supporting text and icons, and multiple variants.

Types

ButtonProps

interface ButtonProps {
...BaseButtonProps--

All BaseButton properties are accepted.

Disabledboolean?--

Whether the button is disabled.

Stylestring?--

The style of the button (e.g., "Filled", "Outlined", "Ghost").

ColorColor3?--

The background color of the button.

Content{string}?--

The content of the button (e.g., text or icons).

ContentColorColor3?--

The color of the button's content.

ContentSizenumber?--

The size of the button's content.

ContentWrappedboolean?--

Whether the content should wrap.

SizeVariant"ExtraSmall" | "Small" | "Medium" | "Large" | "ExtraLarge"?--

The size variant of the button.

Holdingboolean?--

Whether the button is being held.

Hoveringboolean?--

Whether the button is being hovered over.

}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "ButtonProps",
            "desc": "",
            "fields": [
                {
                    "name": "...",
                    "lua_type": "BaseButtonProps",
                    "desc": "All BaseButton properties are accepted."
                },
                {
                    "name": "Disabled",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is disabled."
                },
                {
                    "name": "Style",
                    "lua_type": "string?",
                    "desc": "The style of the button (e.g., \"Filled\", \"Outlined\", \"Ghost\")."
                },
                {
                    "name": "Color",
                    "lua_type": "Color3?",
                    "desc": "The background color of the button."
                },
                {
                    "name": "Content",
                    "lua_type": "{string}?",
                    "desc": "The content of the button (e.g., text or icons)."
                },
                {
                    "name": "ContentColor",
                    "lua_type": "Color3?",
                    "desc": "The color of the button's content."
                },
                {
                    "name": "ContentSize",
                    "lua_type": "number?",
                    "desc": "The size of the button's content."
                },
                {
                    "name": "ContentWrapped",
                    "lua_type": "boolean?",
                    "desc": "Whether the content should wrap."
                },
                {
                    "name": "SizeVariant",
                    "lua_type": "\"ExtraSmall\" | \"Small\" | \"Medium\" | \"Large\" | \"ExtraLarge\"?",
                    "desc": "The size variant of the button."
                },
                {
                    "name": "Holding",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is being held."
                },
                {
                    "name": "Hovering",
                    "lua_type": "boolean?",
                    "desc": "Whether the button is being hovered over."
                }
            ],
            "source": {
                "line": 23,
                "path": "src/Components/Button.luau"
            }
        }
    ],
    "name": "Button",
    "desc": "A robust button component, supporting text and icons, and multiple variants.",
    "source": {
        "line": 6,
        "path": "src/Components/Button.luau"
    }
}