Smooth Grid Layout UI - Documentation
Usage: Inside hierarchy window right-click -> UI -> Smooth Grid Layout. Then put your UI elements under "Elements Container" gameobject. They will be automatically sized according to the grid cell size.
Works in playmode only!
The way it works: for every ui element that you put under "Elements Container" it creates invisible placeholders and puts those under "Placeholders container". Then it links added ui elements to corresponding placeholders so that they lerp to placeholders position.
Not very flexible solution, but still might be useful.