position()
Sets the position of the element within its parent.
position(
position: BindingOrValue<
UIElement.Position | UIElement.Position["gravity"] | undefined
>,
top?: string | number,
end?: string | number,
bottom?: string | number,
start?: string | number,
): this;
Summary
Positions the element using a gravity value (e.g. “start”, “center”, “end”) along with optional offsets, or a complete UIElement.Position object.
Parameters
- position — A UIElement.Position object, or a gravity string (“start”, “center”, “end”, etc.).
- top — The top offset (used if
positionis a gravity string). - end — The end offset (used if
positionis a gravity string). - bottom — The bottom offset (used if
positionis a gravity string). - start — The start offset (used if
positionis a gravity string).
Return value
The builder instance for chaining.
Related
class ElementBuilder abstractstatic
An abstract base class for UI element builders.type UIElement.Position static
A type that describes options for positioning within parent elements.
