type UIElement.Position
A type that describes options for positioning within parent elements.
type Position = {
gravity?:
| "start"
| "end"
| "center"
| "stretch"
| "baseline"
| "overlay"
| "cover"
| "auto"
| "";
top?: string | number;
bottom?: string | number;
left?: string | number;
right?: string | number;
start?: string | number;
end?: string | number;
zIndex?: number;
};Instance members
gravity
The position of the element in the direction perpendicular to the distribution axis of the parent element, oroverlayif the element should be placed on top of other elements (i.e. CSS absolute positioning).top
The top anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto).bottom
The bottom anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto).left
The left anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto); same asstartfor LTR text direction.right
The right anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto); same asendfor LTR text direction.start
The start anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto); same asleftfor LTR text direction.end
The end anchor: relative distance, or absolute position ifgravityis “overlay” (in pixels or string with unit; defaults toauto); same asrightfor LTR text direction.zIndex
The z-index for stacking order; takes precedence over gravity-based defaults.
Related
class UIElement abstract
The base class for built-in UI view elements.position
The position options for this element.
