Skip to content

Border

Render-only decorative outline widget without child widgets.

Overview

Border is a lightweight, render-only decorative outline widget without child widgets. It is useful as a standalone overlay layer — for example, to draw an active selection outline, highlight bounds during debugging, or draw decorative frames.

If you need a container with background, border, and nested children, prefer Box.

Selection Outline

Border outline = new Border()
        .thickness(2.0f)
        .radius(4.0f);
outline.color().set(0.2f, 0.6f, 1.0f, 1.0f);

API

Border()

Constructor

Creates a border decorator with default 1px white border.

Border::color()

Border Color

Returns the live mutable border color.

Returns MutableColor: live MutableColor of the border.

Border::thickness(float)

Set thickness

Sets border stroke thickness in UI pixels.

Parameter Type Description
thickness float Stroke thickness in UI pixels

Returns Border: this widget for fluent configuration.

Border::radius(float)

Set radius

Sets corner radius in UI pixels.

Parameter Type Description
radius float Corner radius in UI pixels

Returns Border: this widget for fluent configuration.