Skip to content
HomePagesHomePages template kit

text

The text slot, sized by the member you pick: `text.short` / `.medium` / `.long`.

The text slot, sized by the member you pick: text.short / .medium / .long.

cap is the slot’s character budget and the ONLY declaration of it: it bounds what a user may type in the editor, and the textBlock filling the slot inherits it as the budget the model is asked to write to. A slot an AI fill decision targets must declare one. fill takes that textBlock — the alternative to source, never its companion.

Import from @homepages/template-kit.

const text: { short: <HasSource>(opts: TextOptions & { source?: HasSource | undefined; fill?: TextFill; } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"short"> & SourceMark<HasSource> & FillMark<TextFill>; medium: <HasSource>(opts: TextOptions & { source?: HasSource | undefined; fill?: TextFill; } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"medium"> & SourceMark<HasSource> & FillMark<TextFill>; long: <HasSource>(opts: TextOptions & { source?: HasSource | undefined; fill?: TextFill; } & WritebackOption<HasSource> & FillOption<HasSource, TextFill>) => TextSlotDef<"long"> & SourceMark<HasSource> & FillMark<TextFill>; }
import { text, textBlock } from "@homepages/template-kit";
text.medium({
cap: 60,
label: "Headline",
fill: textBlock({
structure: "single_sentence",
perspective: "third",
voice: "Confident premium-listing voice.",
content: "Write a marketing headline.",
}),
});