Skip to content
HomePagesHomePages template kit

SectionProps

The full renderer prop type derived from a section's schema: `slots`, the build-injected `nav`, and the stored `variant` case (the union of the declared `display.variant` cases, or plain `string` when the section declares none).

The full renderer prop type derived from a section’s schema: slots, the build-injected nav, and the stored variant case (the union of the declared display.variant cases, or plain string when the section declares none). Sections declare export type Props = SectionProps<typeof schema>; rather than hand-writing this shape.

Import from @homepages/template-kit.

export type SectionProps<S extends SectionSchemaShape> = {
slots: {
[K in keyof S["slots"]]: SlotValue<S["slots"][K]>;
};
nav: SectionNav;
variant: VariantOf<S>;
};