Calm motion: animations on this site only fade, with no movement
Grid
Responsive columns with token gap
Basic
1
2
3
4
5
6
minalone fits as many columns as the width holds. Each column is at leastminwide (16rem by default).columnsalone is a fixed count. Use it inside a box that you know is wide enough.columnsandmintogether give at most that many columns. When the box gets narrow, the grid drops columns before a column gets narrower thanmin. The demo does this: resize the window to see 3, 2, then 1 column.- Each column is
minmax(0, 1fr), so a wide child such as a table cannot push the grid wider than its box.
Usage
ts
import { BlessGrid } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
as | string | "div" | |
columns | number | — | the most columns. Alone, it is a fixed count |
min | string | — | the narrowest a column can be, for example "16rem". With `columns`, the grid drops columns before they get narrower |
gap | 1 | 2 | 3 | 4 | 6 | 8 | 12 | 16 | 4 | space token key |
align | "start" | "end" | "center" | "stretch" | "stretch" |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |