GridItem

Layout & Structure
stable

Grid placement wrapper that serialises column, row and area props into CSS Grid shorthand.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamGridItemSchematic of the GridItem component with 2 numbered internal parts. grid-column / grid-row / grid-area #default slot 1 2 origam-grid-item
Anatomy of <origam-grid-item> — 2 parts: the root element carrying grid placement styles, and the default slot hosting the cell content.
1.origam-grid-item
Root element. Sets grid-column, grid-row or grid-area via inline styles. Also applies min-width: 0; min-height: 0 to prevent overflow.
2.origam-grid-item #default
Default slot hosting the cell content. No constraints imposed — content defines its own sizing.

API

Props

All props accepted by this component, with their type, default value and description.

column
IGridLineSpec | string | number
Inline-axis placement (grid-column). Accepts a line spec object { start, end, span }, a CSS string (e.g. "1 / 5"), or a number.
row
IGridLineSpec | string | number
Block-axis placement (grid-row). Same accepted shapes as column.
area
string
grid-area name. When set, overrides column and row. Use with the parent grid areas prop.
Per-item align-self override. Falls back to the parent grid alignItems when unset.
justifySelf
Per-item justify-self override. Falls back to the parent grid justifyItems when unset.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root of the grid item.

API

Slots

Content slots exposed by this component.

#default
Content placed inside this grid cell.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

ComputedRef<string | undefined>
Serialised grid-column value derived from the column prop. Readable by parent tooling.
ComputedRef<string | undefined>
Serialised grid-row value derived from the row prop.

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Notes

  • GridItem is a layout wrapper with no semantic role. Place semantic content inside the default slot. The tag prop lets you promote it to a meaningful element (e.g. tag="article").

Foundation

Design tokens

Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.

Source
dimension
var(--origam-space---1)
Extra-small gap token shared with parent OrigamGrid.
dimension
var(--origam-space---4)
Medium gap token shared with parent OrigamGrid.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Column placement

vue

Named area

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.