Layout

Grid

Arranges children into N equal CSS Grid columns, with optional responsive column counts at design-system breakpoints. A modern API, not the legacy MUI Grid model.

Examples

Three columns
Loading preview
<Grid columns={3} gap="12px">...</Grid>

API

PropTypeDefaultDescription
columnsnumber | { mobile?, tablet?, desktop? }1Equal columns, or a responsive map.
gapSpacingScale | string0Gap between cells.
rowGap / columnGapSpacingScale | stringnoneOverride row or column gap only.

Styling and attributes

Like every component, Grid accepts the universal token style props (m, p, sx, display, responsive maps, ...) and forwards standard DOM attributes (id, data-*, aria-*, event handlers) to the underlying element. See Styling for the full API.

Guidelines

Do

  • Use a responsive columns map for layouts that reflow on mobile.

Avoid

  • Do not use Grid for one-dimensional rows; use Stack.

Import from @hub/ds-components. Interactive playground: Storybook. Figma Code Connect node 299-140.