IGridProps

interface
Layout

Props contract for OrigamGrid — a declarative CSS Grid container. Covers track templates (columns/rows), gap, areas, auto-flow, alignment, and all standard visual surfaces (color, border, elevation, dimension).

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

columns
TGridTracks
'auto'
Track template for the inline axis (grid-template-columns). Accepts a number (repeat N 1fr), a raw CSS string, or an array of track sizes.
rows
TGridTracks
'auto'
Track template for the block axis (grid-template-rows). Same shapes as columns.
gap
TGridGapSize | string | number
'md'
Both-axis gap. Accepts a size token (xs/sm/md/lg/xl), a CSS length string, or a number (px).
columnGap
TGridGapSize | string | number
Inline-axis gap override. Takes precedence over gap on the column axis.
rowGap
TGridGapSize | string | number
Block-axis gap override. Takes precedence over gap on the row axis.
areas
string | ReadonlyArray<string>
grid-template-areas. Pass a string[] (one row per entry) or a raw CSS string.
autoFlow
TGridAutoFlow
'row'
grid-auto-flow. Controls how implicit tracks are placed when items have no explicit area.
autoColumns
string
grid-auto-columns sizes for implicit columns. Free-form CSS.
autoRows
string
grid-auto-rows sizes for implicit rows. Free-form CSS.
alignItems
TGridPlaceItems
'stretch'
align-items — block-axis alignment of grid items inside their cells.
justifyItems
TGridPlaceItems
'stretch'
justify-items — inline-axis alignment of grid items inside their cells.
alignContent
TGridPlaceContent
align-content — block-axis alignment of the whole grid inside its container.
justifyContent
TGridPlaceContent
justify-content — inline-axis alignment of the whole grid inside its container.
inline
boolean
false
Toggles display: inline-grid instead of display: grid.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Responsive 3-column grid with named areas

vue