Skip to content
HomePagesHomePages template kit

textBlock

Fills a `text` slot with model-generated prose.

Fills a text slot with model-generated prose. structure is the prose shape to generate. perspective is the required grammatical person the copy is written in — there is no omitted mode, so a reader never has to know a default. voice is the required tone/style brief; content is an optional additional prompt.

The character budget lives on the slot: omit cap and the executor writes to the slot’s own cap. State one here only to ask the model for a STRICTLY SHORTER piece than the slot holds — a cap at or above the slot’s is rejected at validation, as a restatement and a silent trim respectively.

Import from @homepages/template-kit.

function textBlock(i: TextBlockInput): BuiltDecision<"text-block">
Name Type Required Description
i TextBlockInput required

BuiltDecision<"text-block">

import { textBlock } from "@homepages/template-kit";
// The slot declares the budget: text.medium({ cap: 60, label: "Headline" })
textBlock({
structure: "single_sentence",
perspective: "third",
voice: "Confident premium-listing voice.",
content: "Write a marketing headline.",
});