UI elements use RectTransform.
It controls:
Code:
RectTransform rect =
GetComponent<RectTransform>();
rect.anchoredPosition =
new Vector2(100f, 50f);
rect.sizeDelta =
new Vector2(300f, 100f);
Anchors define how the UI relates to its parent. Pivot defines the internal reference point used for position, rotation and scale.