Skip to main content

Offset

Offsets a component by the specified distance.

modifier Offset
import { Offset, Text } from ui

export var main = Text("Hello, world!") with {
Offset(x: 100, y: 50)
}

Constructors

(x)

Only offsets on the x-axis.

x: Float

Offsets the component on the x-axis (horizontal).

(y)

Only offsets on the y-axis.

y: Float

Offsets the component on the y-axis (vertical).

(x:​y)

Offsets on both the x- and y-axis.

x: Float

Offsets the component on the x-axis (horizontal).

y: Float

Offsets the component on the y-axis (vertical).

Layout Behavior

Mirrors the components size and offsets it from its determined position.