Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Grid

A responsive collection arranged in a grid.

Preview

Live preview

Changes apply to this preview only.

Pimolu Studio

Pimolu Studio

Shoes

Ships in 2–3 working days.

€129
Canvas tote

Canvas tote

Bags

Ships in 2–3 working days.

€39
Merino cap

Merino cap

Accessories

Ships in 2–3 working days.

€29
Revenue

€24,180

+12.4%
Active users

8,420

+4.1%
Churn

1.8%

−0.3%
NPS

62

+6
Feature

One system, every platform

Grid on web, Stack on native: the same scale names describe the same rhythm.

Track behaviourauto-fit removes empty tracks; auto-fill reserves them so the layout does not jump when items are removed.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Columns

A number builds repeat(n, minmax(0, 1fr)): equal tracks that never overflow their cells.

Open preview

Responsive tracks

auto-fit collapses empty tracks; auto-fill keeps them. The min() guard keeps a track from overflowing a narrow container.

Open preview

Gap and alignment

gap scales on the token system; align and justify drive align-items and justify-items.

Open preview

Usage

Choose minimum column widths that fit the content; stack cards when they no longer fit.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluGridProps

Type source
PimoluGridProps public API
NameTypeDefaultDescription
asElementType | undefined`div`Element rendered by the grid. Defaults to `div`.
columnsPimoluGridColumns | undefinedone column (CSS)Fixed number of equal columns, or a responsive auto-fit/auto-fill track. Defaults to one column (CSS).
minItemWidthstring | number | undefined`16rem` (CSS)Minimum item width for `auto-fit`/`auto-fill`. Numbers are pixels. Defaults to `16rem` (CSS).
gapPimoluGridSpace | undefined`4` (16px)Gap between rows and columns. Defaults to `4` (16px).
alignPimoluGridAlign | undefined—Block-axis alignment of the items (`align-items`).
justifyPimoluGridJustify | undefined—Inline-axis alignment of the items (`justify-items`).
fullWidthboolean | undefinedfalseFill the available inline size.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLElement> | undefined—Standard React/HTML attribute.
as

ElementType | undefined

Default: `div`

Element rendered by the grid. Defaults to `div`.

columns

PimoluGridColumns | undefined

Default: one column (CSS)

Fixed number of equal columns, or a responsive auto-fit/auto-fill track. Defaults to one column (CSS).

minItemWidth

string | number | undefined

Default: `16rem` (CSS)

Minimum item width for `auto-fit`/`auto-fill`. Numbers are pixels. Defaults to `16rem` (CSS).

gap

PimoluGridSpace | undefined

Default: `4` (16px)

Gap between rows and columns. Defaults to `4` (16px).

align

PimoluGridAlign | undefined

No default extracted.

Block-axis alignment of the items (`align-items`).

justify

PimoluGridJustify | undefined

No default extracted.

Inline-axis alignment of the items (`justify-items`).

fullWidth

boolean | undefined

Default: false

Fill the available inline size.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Do not use visual placement to change the apparent reading order.
Read the accessibility guide →