Knit UI
GitHub

Playground

Loading playground…

Playground
<SimpleGrid
  cols={3}
  spacing="md"
/>

Examples

Column Counts

Fixed column count — two, three and four columns, each wrapping six cells.

Loading example…

Column CountsSourceStorybook

Spacing Scale

Spacing scale — all seven space keys applied to the same 3-column grid.

Loading example…

Spacing ScaleSourceStorybook

Asymmetric Spacing

Independent vertical spacing — rows use "xl" while columns stay at "sm".

Loading example…

Asymmetric SpacingSourceStorybook

Min Col Width

minColWidth mode — columns auto-fill at ≥ 160 px; resize the canvas to see them reflow.

Loading example…

Min Col WidthSourceStorybook

Auto Fit Vs Fill

auto-fit vs auto-fill — auto-fit stretches the last row to fill; auto-fill leaves gaps.

Loading example…

Auto Fit Vs FillSourceStorybook

Empty

Renders correctly with no children — the grid frame is present but empty.

Loading example…

EmptySourceStorybook

Styles

Per-slot styles targets individual parts — here the cell wrapper around each child.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
autoFlow"auto-fit" | "auto-fill" | undefined
auto-fill · auto-fit
"auto-fill"Fill behaviour for `minColWidth` mode.
autoRowsstring | undefinedImplicit-row sizing — a web CSS-grid concept with no cross-platform flex equivalent. Accepted for Mantine parity; documented no-op.
childrenReactNode
colsnumber | undefined1Number of equal columns (ignored when `minColWidth` is set).
disabled systemboolean | undefined
minColWidthstring | number | undefinedMinimum column width in px. When set, `cols` is ignored and columns auto-fill.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
spacingSimpleGridSpacing | undefined
xxs · xs · sm · md · lg · xl · xxl
"md"Gap between columns — space key, `$space` token, or raw px number.
styles systemSlotStyles<SimpleGridStyles> | undefinedPer-slot style sugar — props spread onto the matching styled part.
theme systemThemeName | null | undefinedApplies a theme to this element
type"media" | "container" | undefinedResponsive query type. Accepted for Mantine parity; our layout is single-value, so this is a documented no-op.
verticalSpacingSimpleGridSpacing | undefined
unset · xxs · xs · sm · md · lg · xl · xxl
Gap between rows; falls back to `spacing` when unset.

Style slots

Every part of SimpleGrid can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotUsage
cellstyles={{ cell: { … } }}
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 497 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.