Layout library in pure Javascript