AsterUIDocsv1.0.2

Docs / Component reference

Grid, BentoGrid & BentoCard

Arrange items in columns that adapt to the available space. Use a spanning card when one item needs more room.

Grid example

Install

sh
npx @fierst/ui@1.0.2 add grid

Registry dependencies: theme.

Exports from ./ui/grid: Grid, BentoGrid, BentoCard.

Download the registry source for grid 1.0.2.

API contracts

ts
export function Grid({
  cols = 3,
  gap,
  class: extraClass,
  children,
}: {
  cols?: 1 | 2 | 3 | 4;
  gap?: string;
  class?: string;
  children?: View;
})

export function BentoGrid(props: { gap?: string; class?: string; children?: View })

export function BentoCard({
  title,
  description,
  colSpan = 1,
  rowSpan = 1,
  class: extraClass,
  children,
}: {
  title: string;
  description?: string;
  colSpan?: 1 | 2;
  rowSpan?: 1 | 2;
  class?: string;
  children?: View;
})