Add some variety in rect shapes and colors
Don't extend UIBase.  Just create an SVG element in the constructor.
Add an empty addedToParent method (it would be better to make this implement IUIBase)
Add a resize method that would update the svg element to match the drawn shape
Adjust the x and y of the rect to account for the stroke weight
After drawing, call resize on the svg element with the correct dimensions