Basic Usage
Columns
The same set of children reflows as the column count changes.- columns=2
- columns=3
- columns=4
Nested Content
Grids nest naturally with other containers:API Reference
Grid Parameters
Number of grid columns (1-12). Can be passed as a positional argument.
Gap between children. An int maps to
gap-{n}. A tuple (x, y) sets per-axis gaps; use None to skip an axis.Cross-axis alignment:
"start", "center", "end", "stretch", "baseline".Main-axis distribution:
"start", "center", "end", "between", "around", "evenly", "stretch".Additional Tailwind CSS classes.
Protocol Reference
Grid