Layout
UniformGrid
A grid of equal cells that works out its rows or columns from the number of children.
WAI-ARIA tested
Import
main.ts
import { UniformGrid } from '@vitral/vue';Square, from the children
Neither rows nor columns: the grid is the smallest square that holds every child. Add some and watch it grow.
7 children
1
2
3
4
5
6
7
Columns given, rows worked out
columns="4" with ten children makes three rows, each as tall as the tallest cell.
1
2
3
4
5
A taller cell sets every row
7
8
9
10
FirstColumn
A month: seven columns, and first-column set to the weekday the month starts on.
September 2026
123456789101112131415161718192021222324252627282930
API
Read from packages/vue/src/components/UniformGrid/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| rows | number | Number of rows. Left out, it is however many the children need. |
| columns | number | Number of columns. Left out, it is however many the children need; with rows left out too, the grid is square. |
| firstColumn | number | Empty cells before the first child. Applies when `columns` is set and it is smaller than it. |
| spacing | number | string | Space between cells. Defaults to the `uniformgrid.spacing` token. |
| as | string | Component | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | — |