TemplateDefinition
TemplateDefinition<
P> =object
A custom template as its author writes it: what defineTemplate takes.
Type Parameters
Section titled “Type Parameters”P
Properties
Section titled “Properties”adTypes?
Section titled “adTypes?”
optionaladTypes?: readonlystring[]
The ad types component renders a creative of, by key, such as banner or your organization’s own: a slot of any
other ad type takes no creative while a variant uses this template. Absent, it renders none. Checked at push.
blocks?
Section titled “blocks?”
optionalblocks?: readonlystring[]
The EdgeKit block keys component lays out, such as rich-text and story-cards: a stack slot’s palette may
offer only these, and a push renders each in a stack. Absent, the template takes no stack. Checked at push.
component
Section titled “component”component: (
input) =>ReactNode
The email, as a React Email component.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”ReactNode
fixtureProps?
Section titled “fixtureProps?”
optionalfixtureProps?:unknown
The props EdgeKit renders every fixture with when you push, as JSON of at most 16 KB; {} when absent. Set them
when a prop is required, or the push is refused. Checked at push, by props, never here.
locales
Section titled “locales”locales:
string[]
Every locale it has copy for. A regional tag is served by its base language’s (en serves en-GB).
name:
string
The template’s name; a variant names it custom:<name>.
props:
StandardSchemaV1<unknown,P>
Validates the variant’s props, a Standard Schema v1 validator such as a zod schema.
selectSlots?
Section titled “selectSlots?”
optionalselectSlots?: (slots) =>EditionSlot[]
The slots it renders, when not all: component gets only these, and a send records only their items.