Tailwind CSS
/Advanced
Grid Auto Flow
Definition
Utilities for controlling how the auto-placement algorithm works, specifying exactly how items flow into the grid.
Explain Like I'm New
When you dump 10 items into a grid, do they fill up the columns first (left-to-right), or do they fill up the rows first (top-to-bottom)? Auto-flow lets you decide.
Real World Example
Using `grid-flow-col` to create a horizontal scrolling carousel where items naturally stack sideways into columns instead of wrapping downward.
Common Use Cases
- •Dense photo grids
- •Horizontal carousels
Interactive Example
Interview Questions
basic
- What is the default auto-flow direction for CSS Grid?
intermediate
- What does the `grid-flow-row-dense` class do?