SimpleGrid
Uniform-column grid driven by columns (a number or breakpoint map) and gap. The 90% path that doesn't need Grid's full template surface.
Plain <div> — identical semantics to Grid. Pair items with semantic children (cards, list items) when they represent content.
Preview
tsx
import { Box, SimpleGrid } from '@arshad-shah/cynosure-react';
export default function Example() {
return (
<SimpleGrid
columns={{ base: 2, md: 4 }}
gap="3"
padding="4"
background="bg.subtle"
borderRadius="md"
>
<Box padding="3" background="bg.surface" borderRadius="sm">
1
</Box>
<Box padding="3" background="bg.surface" borderRadius="sm">
2
</Box>
<Box padding="3" background="bg.surface" borderRadius="sm">
3
</Box>
<Box padding="3" background="bg.surface" borderRadius="sm">
4
</Box>
</SimpleGrid>
);
}
Responsive columns
Section titled “Responsive columns”Pass a breakpoint map to columns so the grid reflows naturally — the most common pattern is a 1-column phone layout that climbs to 4 columns on the widest viewports.
Preview
tsx
import { Box, SimpleGrid } from '@arshad-shah/cynosure-react';
const CARDS = ['Alpha', 'Beta', 'Gamma', 'Delta', 'Epsilon', 'Zeta'];
export default function Example() {
return (
<SimpleGrid
columns={{ base: 1, sm: 2, lg: 3 }}
gap="3"
padding="4"
background="bg.subtle"
borderRadius="md"
>
{CARDS.map((label) => (
<Box key={label} padding="3" background="bg.surface" borderRadius="sm">
{label}
</Box>
))}
</SimpleGrid>
);
}
minChildWidth
Section titled “minChildWidth”When the column count should be driven by space rather than by you, pass minChildWidth and let the grid pick the column count automatically. New columns appear whenever the container can fit another minChildWidth-wide track.
Preview
tsx
import { Box, SimpleGrid } from '@arshad-shah/cynosure-react';
const TILES = ['Aurora', 'Borealis', 'Cassiopeia', 'Draco', 'Eridanus', 'Fornax', 'Gemini'];
export default function Example() {
return (
<SimpleGrid minChildWidth="180px" gap="3" padding="4" background="bg.subtle" borderRadius="md">
{TILES.map((label) => (
<Box key={label} padding="3" background="bg.surface" borderRadius="sm">
{label}
</Box>
))}
</SimpleGrid>
);
}
PropTypeDefaultDescription
className
string
—
Additional class names appended after Cynosure's base classes.
style
CSSProperties
—
Inline style overrides merged last.
children
ReactNode
—
Grid children.
columns
Responsive<number>
—
Fixed column count — emits `repeat(N, minmax(0, 1fr))`. Ignored when
`minChildWidth` is set.
minChildWidth
—
Minimum width each child should occupy before a new column is added.
Emits `repeat(auto-fit, minmax(<minChildWidth>, 1fr))` for a fluid grid
that reflows without breakpoints. Wins over `columns`.
paddingX
—
Horizontal padding (left + right). Overrides `padding` on the X axis.
paddingY
—
Vertical padding (top + bottom). Overrides `padding` on the Y axis.
height
—
Element height. Accepts a `SpaceToken`, `LengthValue`, or named alias.
minWidth
—
Minimum width — useful for preventing flex children from collapsing.
background
—
Background colour. Use a `ColorToken` like `"bg.surface"` for theme awareness.
borderColor
—
Border colour. Pair with `borderWidth` to make the border visible.
opacity
Responsive<number | `${number}`>
—
Opacity 0–1. Use sparingly — prefer surface tokens over translucency.
overflowX
—
Horizontal-axis overflow control. Overrides `overflow` for the X axis.
display
—
CSS `display` value. `"contents"` removes the element's box from layout.
position
—
CSS `position`. Pair with `top`/`right`/`bottom`/`left` for placement.
top
—
Top inset (when positioned). Accepts a `SpaceToken`, `"auto"`, `"0"`, or `LengthValue`.
flex
Responsive<"1" | "none" | "auto" | "initial" | (string & {})>
—
Shorthand: `1 | auto | none | initial | <css>`. Resolves to `flex` on the child.
asChild
boolean
—
When `true`, renders the primitive's single React child via `Slot`,
forwarding className/style/ref/event handlers onto it.
as
ElementType
"div"
Rendered intrinsic element or component.
ref
ForwardedRef<Element>
—
Recipes
Section titled “Recipes”- Card grids:
<SimpleGrid columns={{ base: 1, sm: 2, lg: 3 }} gap="4" />covers most product / blog / team layouts. - Auto-flow gallery:
<SimpleGrid minChildWidth="200px" gap="3" />adapts to any container width without a media-query map. - For non-uniform columns or named areas, reach for
Gridinstead.