Skip to content

Grid

Grid

<Grid columns={3} gap={4}>...</Grid>
<Grid columns="repeat(auto-fit, minmax(240px, 1fr))" gap={6}>...</Grid>

Install: @helixui/core

import { Grid } from '@helixui/core'

status: stable · since: 0.1.0

Tags: primitive, grid, columns, rows

Anatomy

[ . ][ . ][ . ]
[ . ][ . ][ . ] ← columns/rows tunable

Layout

  • displaygrid
  • widthauto
  • heightauto
  • intrinsicSizeCSS grid container, tunable tracks
  • stackabletrue
  • fullBleedfalse

Visual

A CSS grid container. Pass a number for equal columns, or any raw grid-template-columns track string. Token-aware gaps.

Props

NameTypeDefaultDescription
columnsnumber | stringEqual columns when number; raw grid-template-columns when string.
rowsnumber | stringSame shape, applied to rows.
gapnumber | stringCell gap. Numeric → space.N token.
rowGapnumber | stringRow gap override.
columnGapnumber | stringColumn gap override.
inlinebooleanfalseUse inline-grid.

Tokens used

space.2, space.4, space.6

Accessibility

Notes

  • Presentational. Use semantic elements as children.

Composes with

ComponentRelationNote
FlexalternativeUse Flex for 1-D layout.
StackalternativeUse Stack for vertical/horizontal stacking with consistent gap.
Boxsibling

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

three-column responsive grid

“3 column grid with 24px gap”

<Grid columns={3} gap={6}>{cards}</Grid>

“auto-fitting tiles min 240px”

<Grid columns="repeat(auto-fit, minmax(240px, 1fr))" gap={6}>{items}</Grid>