Skip to content

TemplateDefinition

TemplateDefinition<P> = object

A custom template as its author writes it: what defineTemplate takes.

P

optional adTypes?: readonly string[]

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.


optional blocks?: readonly string[]

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: (input) => ReactNode

The email, as a React Email component.

TemplateInput<P>

ReactNode


optional fixtureProps?: 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: 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.


optional selectSlots?: (slots) => EditionSlot[]

The slots it renders, when not all: component gets only these, and a send records only their items.

EditionSlot[]

EditionSlot[]

edgekit.ai