Skip to main content

Switch

Useful for letting the user switch things on / off.

Types

SwitchProps

interface SwitchProps {
...BaseButtonProps--

All BaseButton properties are accepted.

Switchedboolean?--

Whether the switch is toggled on or off

Disabledboolean?--

Whether the switch is disabled

ColorColor3?--

The color of the switch when toggled on

}
Show raw api
{
    "functions": [],
    "properties": [],
    "types": [
        {
            "name": "SwitchProps",
            "desc": "",
            "fields": [
                {
                    "name": "...",
                    "lua_type": "BaseButtonProps",
                    "desc": "All BaseButton properties are accepted."
                },
                {
                    "name": "Switched",
                    "lua_type": "boolean?",
                    "desc": "Whether the switch is toggled on or off"
                },
                {
                    "name": "Disabled",
                    "lua_type": "boolean?",
                    "desc": "Whether the switch is disabled"
                },
                {
                    "name": "Color",
                    "lua_type": "Color3?",
                    "desc": "The color of the switch when toggled on"
                }
            ],
            "source": {
                "line": 16,
                "path": "src/Components/Switch.luau"
            }
        }
    ],
    "name": "Switch",
    "desc": "Useful for letting the user switch things on / off.",
    "source": {
        "line": 6,
        "path": "src/Components/Switch.luau"
    }
}