[ type ] Border

Description:

Border object used to define the visual border of UI components like Panel, Label, Button, TextField, TextArea and more.

Type: Object

Properties:

Name Type Description

style

BorderStyle

(Required) The border style.

[size]

number

Border size in pixels. Must be >= 1.

[padding]

string

Inner padding as a space-separated string of four integer values: "top right bottom left". Example: "5 10 5 10". Can be set even when style is "none".

[color]

string

Border color. Only applicable for "line" or "dashed" styles.

[rounded]

boolean

If true, renders rounded corners for "line" style, or rounded dashes for "dashed" style. Only applicable for "line" or "dashed" styles.

[length]

number

Length of each dash. Only applicable for "dashed" style.

[spacing]

number

Length of the gaps between dashes. Only applicable for "dashed" style.

[offset]

number

Starting offset of the dash pattern. Can be used to animate dashes. Only applicable for "dashed" style.

[text]

string

Label text displayed at the top-left of the border, creating a titled border effect.

[alignment]

string

Placement of the border label text. Accepts a combination of: "left", "center", "right", "leading", "trailing", "top", "bottom", "above", "below". "above" and "below" refer to placement relative to the border line itself. Defaults to "top left".

[font]

Font

Font used to render the border label text.

Also See: