Skip to content

Grid

[axGrid] is a CSS Grid layout primitive: configurable columns, gap, and an auto-fit mode driven by minColWidth. For simple 1–12 responsive grids, plain Tailwind grid utilities are also fine.

import { AxGridDirective } from '@axisui-ng/primitives';
<!-- fixed 3 columns -->
<div axGrid [cols]="3" gap="4"></div>
<!-- responsive auto-fill: as many columns as fit at >= 240px -->
<div axGrid cols="auto-fill" minColWidth="240px" gap="4"></div>
InputTypeDefaultNotes
cols1 | 2 | 3 | 4 | 5 | 6 | 12 | 'auto-fill' | 'auto-fit'1Fixed column count, or auto-fill / auto-fit with minColWidth.
gap'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16''4'Spacing token (both axes).
rowGap'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16' | nullnullOverride row gap.
colGap'0' | '1' | '2' | '3' | '4' | '5' | '6' | '8' | '10' | '12' | '16' | nullnullOverride column gap.
minColWidthstring'240px'Minimum column width when cols is auto-fill or auto-fit.

Presentational only — it adds no roles or semantics.

Interactive examples live in Storybook under Primitives / Grid. Run pnpm storybook to explore them.