Skip to content

Stroke ​

Draws a border around a widget.

luau
PeanutUI.Frame {
    stroke = {
        thickness = 2,
        color = Color3.new(1, 1, 1),
    }
}

Use strokes to attach multiple strokes:

luau
PeanutUI.Frame {
    strokes = {
        { thickness = 2, color = Color3.new(1, 1, 1) },
        { thickness = 2, color = Color3.new(0, 0, 0), borderOffset = PeanutUI.Unit(2) },
    }
}

Properties ​

PropertyTypeDescription
enabledbooleanWhether the stroke is drawn.
zIndexnumberDraw order.
colorColor3Stroke color.
transparencynumberStroke transparency.
thicknessnumberStroke thickness.
borderOffsetUnitOffset from the border.
strokeMode"Border" | "Contextual"Stroke mode.
borderPosition"Center" | "Inner" | "Outer"Border position.
lineJoinMode"Bevel" | "Miter" | "Round"Line join mode.
gradientGradientOptional gradient applied to the stroke.