display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 5px; // this will add grid margin // use no extra margin (fxLayoutGap)