Skip to main content

Position

Absolutely positions the component in the available space from the top left corner.

modifier Position

Example

import { Position, Text } from ui

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

Constructors

X

constructor(x: Float)

Only positions on the x-axis

x: Float

Sets the absolute x value.


Y

constructor(y: Float)

Only positions on the y-axis.

y: Float

Sets the absolute y value.


X and Y

constructor(x: Float, y: Float)

Positions on both the x- and y-axis.

x: Float

Sets the absolute x value.

y: Float

Sets the absolute y value.

Layout Behavior

Fills the available area in the axis specified. The unspecified axis has no layout effects.