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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

Héritage

Hérite de

Interfaces parentes dont celle-ci hérite. Leurs propriétés sont disponibles pour tout consommateur de cette interface.

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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.

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Responsive 3-column grid with named areas

vue