Skip to content
HomePagesHomePages template kit

list

The list slot — one primitive for everything multi-item.

The list slot — one primitive for everything multi-item. The item is a single slot (list.of(text.short({ label: "Feature", cap: 80 }), { label: "Features" }), list.of(image({ label: "Photo", crop }), { min: 3, label: "Photos" }), list.of(poi({ label: "Restaurant" }), { max: 6, label: "Restaurants" })) or a record of slots (list.of({ photo: image({ label: "Photo" }), caption: text.short({ label: "Caption", cap: 80 }) }, { label: "Slides" })). A single item emits element; a record emits fields with the optional layout/title row surface. Depth is fixed: an item is never a list, a record field is never a record, and a field-level list holds a single non-record item — each violation is a compile error here and a parse error on the wire.

Import from @homepages/template-kit.

const list: { of: typeof listOfElement & typeof listOfRecord; }