Skip to content

Button

A simple button that can be used for a variety of purposes.

Properties

Color, Variant, AppearanceOverride

Use the Color, Variant and AppearanceOverride properties to style the component.

Available colors are amber, blue, cyan, emerald, fuchsia, green, indigo, lime, neutral, orange, pink, purple, red, rose, sky, slate, stone, teal, violet, yellow, zinc, white, gray, black. Available variants differ per color and can be viewed in the UI demo below.

The theme data for the component can be found in the Theming section and can be overwritten through AppearanceOverride.

Pass Color and Variant as a string and AppearanceOverride as an optionalColorTable. More information on overrides can be found here.

Hovering

A state input for hovers. If passed a boolean, it will be converted into a value inside of the component. Otherwise, the value will be used to determine hover states. Setting this to true will enable the hover appearance.

Type

luau

Code block has not loaded. An error may have occurred.

Pressing

A state input for presses. If passed a boolean, it will be converted into a value inside of the component. Otherwise, the value will be used to determine pressing states. Setting this to true will enable the press appearance.

Type

luau

Code block has not loaded. An error may have occurred.

Disabled

Type

luau

Code block has not loaded. An error may have occurred.

DisableHoverLighting

Type

luau

Code block has not loaded. An error may have occurred.

Padding

Type

luau

Code block has not loaded. An error may have occurred.

ContentSpacing

Type

luau

Code block has not loaded. An error may have occurred.

ButtonText

Type

luau

Code block has not loaded. An error may have occurred.

Icon

Type

luau

Code block has not loaded. An error may have occurred.

TrailingIcon

Type

luau

Code block has not loaded. An error may have occurred.

Content

Type

luau

Code block has not loaded. An error may have occurred.

ContentFullSize

Whether the content should, by default, take up the full size available instead of sizing to its content.

Type

luau

Code block has not loaded. An error may have occurred.

OnMouseChanged

Type

luau

Code block has not loaded. An error may have occurred.

OnClick

Type

luau

Code block has not loaded. An error may have occurred.

OnMouseButton2Changed

Type

luau

Code block has not loaded. An error may have occurred.

OnMouseButton2Click

Type

luau

Code block has not loaded. An error may have occurred.

OnHover

Type

luau

Code block has not loaded. An error may have occurred.

DisablePressHandler

Whether presses should be handled by the button or something external (through the Pressing property)

Type

luau

Code block has not loaded. An error may have occurred.

DisableHoverHandler

Whether hovers should be handled by the button or something external (through the Hovering property)

Type

luau

Code block has not loaded. An error may have occurred.

Instance Properties

This instance takes all the properties of a TextButton. SpecialKeys, such as fusion.Children will also be passed to the instance.

Theming

States

StateDescription
Base
Hover
Pressing
Disabled

Colors

ColorDescription
Background
Text
Stroke