Skip to content

Spinner, Line & Shapes

spinner

Rotating arc loading indicator.

lua
ui:element({
    id = "loading", type = "spinner",
    rect = { unit = "px", x = 10, y = 10, w = 40, h = 40 },
    style = { color = "#38BDF8", thickness = 4 },
})
StyleDescription
colorArc color (default accent blue)
track_colorBackground track color
thicknessArc thickness in pixels (default 4)
arc_lengthFraction of full circle (default 0.3)
speedRotations per second (default 2)

line

A line between two points. Element rect is ignored — positioning via props.

lua
ui:element({
    id = "sep", type = "line",
    rect = { unit = "px", x = 0, y = 0, w = 0, h = 0 },
    props = { x1 = "10", y1 = "50", x2 = "200", y2 = "50" },
    style = { color = "#334155", thickness = "2" },
})
PropDescription
x1, y1Start point
x2, y2End point
StyleDescription
colorLine color (default white)
thicknessThickness in pixels (default 2)

rect_outline / border

Outline-only rectangle (no fill).

StyleDescription
colorOutline color
thicknessBorder thickness (default 1)

circle

Filled or outline circle.

StyleDescription
colorCircle color
thicknessOutline thickness (0 = filled)

⚠️ This documentation was AI-generated and may contain inaccuracies. Please submit pull requests with corrections as needed.