Skip to content

FragmentFieldSpec

FragmentFieldSpec = string | { fallback: string | string[]; kind?: FragmentKind; swap?: FragmentSwapPolicy; }

Defined in: fragments.ts:79

Bare-string shorthand: "Sign in" means { kind: "body", fallback: "Sign in" }.

An ARRAY fallback declares one paragraph per element: intro with three elements expands to the ordinary fields intro1, intro2, intro3 before anything is hashed or sent — the wire never learns arrays exist. One kind per array, applied to every element; per-paragraph budgets, so each paragraph’s envelope is its own and a whole section stays layout-stable. The array is a DECLARATION, not data: it must be literal in your source, because its length is part of the schema hash — a different paragraph count is a different construction.

string


{ fallback: string | string[]; kind?: FragmentKind; swap?: FragmentSwapPolicy; }

fallback: string | string[]

optional kind?: FragmentKind

optional swap?: FragmentSwapPolicy

Late-swap policy. Every value behaves as "never"; the other values are deprecated (see FragmentSwapPolicy).