Global edge
Pages load from the region nearest each visitor.
Preview branches
Every pull request gets its own address.
Speed insights
See how real visitors experience each page.
Automatic HTTPS
Certificates are issued and renewed for you.
Instant rollbacks
Put any earlier deploy back in one click.
Command line
Deploy, inspect and tail logs from a terminal.
- Add the registry
- Add grid
Usage
Grid renders its guides, the lines between cells, from its columns and rows, so set both. Each
GridCell fills the next free cell in order, unless its column and row place it.
Use Grid where the lines are part of the design, as in a feature list or the sections of a landing
page. For cards or a list in a few responsive columns, use Tailwind's grid and grid-cols-*
utilities directly. Grid is only worth using when its guides show.
Breakpoints
columns, rows and a cell's column, row and solid each take an object of values by
breakpoint, such as { base: 1, md: 3 }. A breakpoint takes the value of the one before it unless
it has its own. The breakpoints are Tailwind's container sizes, measured on the grid itself rather
than the viewport, so a Grid lays out the same in a narrow sidebar on a wide screen as on a phone.
Composition
Examples
Basic
Cells without a column or row fill the grid in order.
Solid cells
solid gives a cell the background behind the grid. The guides inside the cell disappear, and the
lines along its edges stay. Without it, the guides show through a cell that spans several columns,
as they do through 5 + 6.
Responsive
Resize the page to see the grid go from one column to two to three.
Responsive solid cells
A cell can span, move and become solid at different breakpoints. In this example, 1 + 2 is solid
only from sm, where it spans both columns.
Row guides only
guides="rows" renders only the lines between rows, for a list of rows. guides="columns" renders
only the lines between columns. Hide one set only when the layout reads along one axis and the
lines across it would add nothing. If you'd hide both sets, use Tailwind's grid utilities
instead.
Column guides only
Placement
column and row place a cell, as a number or as a grid-column or grid-row value such as
"2 / 4" or "span 2". Cells without them fill in around the placed ones. Placed cells can
overlap: later cells sit on top, and a solid cell hides what's beneath it.
Square cells
square sizes the rows to match the columns, so every cell is square, even with nothing in it.
Stacked
Grids placed one after another share the border between them, so sections of a page can each have their own columns.
Ship from your branch
Every push builds and gets its own address.
Props
Base UI's styling (opens in a new tab) and composition (opens in a new tab) guides say more about className, style and render.