Theme: ← Übersicht Tokens

Raster

Zwölf-Spalten-Raster. Kinder bestimmen ihre Breite über node.layout.span; ohne Angabe gilt die Vorgabe aus dem columns-Prop. 1.2.0 (opt-in): columns = tiles richtet die Spalten nach der eigenen Breite (1, ab 36rem 2, ab 64rem 4; Container-Query über eine Hülle).

Layouts v1.2.2 Layout WebsiteAppDesktop layout.grid

Beispiele

3 Spalten (bricht mobil auf 1)

Produkt A

Raster-Zelle eins.

Produkt B

Raster-Zelle zwei.

Produkt C

Raster-Zelle drei.

auto-fit nach Mindestbreite

Auto 1

So viele Spalten wie passen.

Auto 2

Mindestbreite 240px.

Auto 3

Fluid ohne Media Query.

Auto 4

Vierte Zelle.

Responsive Props: mobil 2, ab md 4 Spalten — Abstand mobil sm, ab md lg

R1

base: 2 Spalten.

R2

ab md: 4 Spalten.

R3

Explizit pro Breakpoint.

R4

Statt eingebackenem Verhalten.

Eigenschaften

PropTypDefaultBuilder-Label
columnsstring: auto | fill | 1 | 2 | 3 | 4 | 6 | 12 | tiles"auto"Spalten
gapstring: none | sm | md | lg | xl"md"Abstand
paddingstring: standard | none | sm | md | lg | xl"standard"Innenabstand (standard = Baustein-Wert, schlaegt Eigenabstand)
marginstring: standard | none | sm | md | lg | xl"standard"Aussenabstand
borderstring: standard | none | hairline | strong"standard"Rahmen
radiusstring: standard | none | control | surface | pill"standard"Ecken-Rundung
textColorstring""Textfarbe (Token; leer = Standard)
backgroundColorstring""Hintergrundfarbe (Token; leer = Standard)
shadowstring: standard | none | sm | md | lg"standard"Schatten
widthstring: standard | container | full"standard"Breite (full = Band aus dem Container, container = im Container)
heightstring: standard | half | full"standard"Hoehe (full = Bildschirmhoehe, Inhalt zentriert)
backgroundImagestring""Hintergrundbild (https-URL oder /pfad; leer = keins)
backgroundDimstring: standard | light | medium | strong"standard"Bild abdunkeln (Lesbarkeit; standard = aus)
backgroundFixedbooleanfalseBild steht fest beim Scrollen (Parallax)
alignSelfstring: standard | start | center | end"standard"Ausrichtung im Elternteil
anchorstring""Anker-ID (Sprungziel, z. B. fuer Nav-Links)

* Pflicht-Prop

Events & Slots

Slot default: akzeptiert ui.*, component.*, section.*, layout.*

LLM-Notizen

layout.grid

Zwölf-Spalten-Raster; Kinder bestimmen ihre Breite über node.layout.span.

Wann nutzen

  • Für Kachel-/Zellenanordnungen mit mehreren Elementen und feiner Breitensteuerung.
  • Für genau zwei feste Spalten layout.columns; für eine umbrechende Reihe layout.cluster.

Wichtige Props

  • columns = Spalten (responsiv): auto* (auto-fit ab Mindestbreite) | fill (leere Spuren bleiben) | 1 | 2 | 3 | 4 | 6 | 12.
  • gap = Abstand (responsiv): none | sm | md* | lg | xl.

Slots

  • default = Zellen (Pflicht, mehrere): ui.*, component.*, section.*, layout.*.

Beispiel-Node

{ "definition": "layout.grid", "props": { "columns": "3", "gap": "lg" }, "slots": { "default": [{ "definition": "component.product-card" }, { "definition": "component.product-card" }] } }

Hinweise

  • Kindbreite über node.layout.span; ohne Angabe gilt die Vorgabe aus columns.
  • columns und gap sind pro Breakpoint wählbar (responsive).