Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / ForProps

Interface: ForProps<T>

Defined in: flow/src/components.ts:810

Props for For: the each array, an optional keyBy field, and the item template children.

Type Parameters

T

T

Properties

each

each: readonly T[]

Defined in: flow/src/components.ts:812

The array to render — an @expose/@locked prop; its name drives the reactive x-for.


keyBy?

optional keyBy?: string

Defined in: flow/src/components.ts:814

The item field used as Alpine's stable :key (e.g. keyBy="id").


children

children: (item, index) => HtmlNode

Defined in: flow/src/components.ts:816

The item template: (item, index) => <li>…</li>.

Parameters

item

T

index

number

Returns

HtmlNode