Sanity Library Reference Docs
    Preparing search index...

    Interface StringSchemaType

    This is used for string, text, date and datetime. This interface represent the compiled version at runtime, when accessed through Schema.

    interface StringSchemaType {
        components?: {
            annotation?: ComponentType<any>;
            block?: ComponentType<any>;
            diff?: ComponentType<any>;
            field?: ComponentType<any>;
            inlineBlock?: ComponentType<any>;
            input?: ComponentType<any>;
            item?: ComponentType<any>;
            portableText?: { plugins?: ComponentType<any> };
            preview?: ComponentType<any>;
        };
        deprecated?: DeprecatedProperty;
        description?: string;
        hidden?: ConditionalProperty;
        icon?: ComponentType;
        initialValue?: InitialValueProperty<any, string>;
        jsonType: "string";
        liveEdit?: boolean;
        name: string;
        options?: StringOptions & TextOptions & DateOptions & DatetimeOptions;
        placeholder?: string;
        preview?: PreviewConfig;
        readOnly?: ConditionalProperty;
        title?: string;
        type?: SchemaType;
        validation?: SchemaValidationValue;
    }

    Hierarchy (View Summary)

    Index

    Properties

    components?: {
        annotation?: ComponentType<any>;
        block?: ComponentType<any>;
        diff?: ComponentType<any>;
        field?: ComponentType<any>;
        inlineBlock?: ComponentType<any>;
        input?: ComponentType<any>;
        item?: ComponentType<any>;
        portableText?: { plugins?: ComponentType<any> };
        preview?: ComponentType<any>;
    }
    deprecated?: DeprecatedProperty
    description?: string
    icon?: ComponentType
    initialValue?: InitialValueProperty<any, string>
    jsonType: "string"
    liveEdit?: boolean
    name: string
    placeholder?: string

    This will be removed.

    preview?: PreviewConfig
    title?: string
    type?: SchemaType