GridItem

Layout & Structure
stable

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

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

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

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et 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

Emplacements de contenu exposés par ce composant.

#default
Content placed inside this grid cell.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

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").

Fondation

Design tokens

Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.

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.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Column placement

vue

Named area

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.