BeeGrid
A grid of equal-width columns that collapses to a single column on small screens.
ts
import { BeeGrid } from "@thaisrr/beedesign";
import "@thaisrr/beedesign/style.css";Usage
The columns prop is required. Items go in the default slot and fill the grid row by row.
One
Two
Three
Four
Five
Six
Gap
The gap prop accepts a keyword (none, sm, md, lg) tied to the spacing tokens, or a number in pixels.
gap="none"1234
gap="sm"1234
gap="md"1234
gap="lg"1234
:gap="48"1234
Spanning an item
An item can take up several columns with grid-column in your own CSS.
Spans two columns
One column
One column
Spans two columns
Responsive
By default, below 1000px wide, the grid switches to a single column. Items that spanned several columns go back to a normal position. Turn this off with :responsive="false".
One column below 1000px
Resize the window
to see the difference
API
Props
| Name | Type | Default | Description |
|---|---|---|---|
columns | number | Number of columns. Required. | |
gap | "none" | "sm" | "md" | "lg" | number | "lg" | Spacing. A number is in pixels. |
responsive | boolean | true | Single column below 1000px. |
Slots
| Name | Description |
|---|---|
default | Items of the grid. |
CSS variables used
--bd-space-sm, --bd-space-md, --bd-space-lg.