It’s possible now to create “Prefabs” for your UI elements and then reference them in code.
However, there is no documentation on how to reference these prefabs in code. For instance, how could I set the values as shown in the old gui (like Rect etc), in a prefab?
The new UI works like everything else now. Prefabs work the same as any prefab. Access its components, just like a regular instantiated prefab. Only real differences are; some things need to be in place first like a Canvas and an EventSystem if you want input, and the instantiated prefabs need to be added to the Canvas or a child of a Canvas.