Sanity Library Reference Docs
    Preparing search index...

    Interface TemplateFieldDefinition

    Field definition for a template parameter. Closely resembles API used to define fields for object schema types.

    interface TemplateFieldDefinition {
        description?: string;
        name: string;
        options?: { [key: string]: any };
        title?: string;
        type: string;
    }
    Index

    Properties

    description?: string

    Description for the parameter. Optional. May be used in the future to explain the parameter in UIs.

    name: string

    Parameter name. Must be unique within the template.

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

    Optional bag of options for the parameter. Currently unused.

    title?: string

    Parameter type. Will be attempted to be automatically set if not given, by title-casing the name property.

    type: string

    Parameter type, eg string, number, boolean etc.