v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

Grid

Responsive columns with a useful minimum item width.

Interactive preview

Design

One considered step.

Build

One considered step.

Ship

One considered step.

Usage

import { Grid, Card, CardContent } from "@devvy-ui/react";

<Grid minItemWidth="10rem"><Card><CardContent>Design</CardContent></Card><Card><CardContent>Build</CardContent></Card></Grid>

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
columnsnumberautomaticOptional fixed count, clamped to 1..24.
minItemWidth / gapCSS length / gap14rem / 1remAuto-fit minimum width and spacing.

Accessibility & behavior

Platform Behavior & Guidelines

Automatic columns fit the available container. Fixed columns preserve the requested count; switch back to minItemWidth for responsive content. Reading/tab order follows source order. Classes, style and refs remain available.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add grid

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

Grid.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.