UI component that fits elements in a sized html grid