Skip to content

StyleBox

Type

StyleBox is an immutable UI surface style created with StyleBox.new.

Example

-- Client script.
local box = StyleBox.new({
    Color = Color.White,
    CornerRadius = 6,
})
print(box.CornerRadius) -- prints 6

Color

Field
Color: Color

Color is the fill Color of the surface.

BorderColor

Field
BorderColor: Color?

BorderColor is the border Color, or nil when unset.

BorderWidth

Field
BorderWidth: number

BorderWidth is the non-negative border thickness in points.

CornerRadius

Field
CornerRadius: number

CornerRadius is the non-negative corner rounding radius in points.

Padding

Field
Padding: Insets

Padding is the inner Insets padding.

Image

Field
Image: string?

Image is the background texture asset id string, or nil when unset.

Slice

Field
Slice: Insets?

Slice is the nine-slice border Insets, or nil when unset.