Sanity Library Reference Docs
    Preparing search index...

    Interface InitialValueTemplateItem

    Representation of an initial value template item Used by the structure.StructureBuilder class to determine which initial value templates should be available for a structure node, such as a list pane.

    interface InitialValueTemplateItem {
        description?: string;
        i18n?: I18nTextRecord<"title">;
        icon?: Element | ElementType<any, (keyof IntrinsicElements)>;
        id: string;
        initialDocumentId?: string;
        parameters?: { [key: string]: any };
        schemaType: string;
        subtitle?: string;
        templateId: string;
        title?: string;
        type: "initialValueTemplateItem";
    }

    Hierarchy (View Summary)

    Index

    Properties

    description?: string

    No longer used anywhere

    i18n?: I18nTextRecord<"title">
    icon?: Element | ElementType<any, (keyof IntrinsicElements)>

    React icon for the item, if any. Defaults to the icon for the associated template.

    id: string

    ID for this template item

    initialDocumentId?: string

    Experimental: not fully supported yet Hints at what the document ID for the new document should be. Leave undefined to let the system decide.

    parameters?: { [key: string]: any }

    Parameters for the template - an object of any JSON-serializable values

    schemaType: string

    Initial value template schema type

    subtitle?: string

    No longer used anywhere

    templateId: string

    ID for the template. Must be unique within the set of templates.

    title?: string

    Title for the item. Defaults to the title of the associated template.

    type: "initialValueTemplateItem"