By default, flex items stay on a single line and may overflow or shrink. flex-wrap: wrap allows wrapping onto new lines when space runs out, creating several flex lines. Combined with gap and flex-basis, it produces adaptive card grids.
Example
ul { display: flex; flex-wrap: wrap; gap: 1rem; }