Sanity Library Reference Docs
    Preparing search index...

    Interface VideoDefinition

    interface VideoDefinition {
        components?: ObjectComponents;
        deprecated?: DeprecatedProperty;
        description?: string | Element;
        fields?: FieldDefinition<
            | "string"
            | "number"
            | "boolean"
            | "object"
            | "array"
            | "block"
            | "date"
            | "datetime"
            | "document"
            | "file"
            | "geopoint"
            | "image"
            | "reference"
            | "crossDatasetReference"
            | "globalDocumentReference"
            | "slug"
            | "text"
            | "url"
            | "email"
            | "sanity.video",
            undefined,
        >[];
        fieldsets?: FieldsetDefinition[];
        hidden?: ConditionalProperty;
        icon?: ComponentType
        | ReactNode;
        initialValue?: InitialValueProperty<any, VideoValue>;
        name: string;
        options?: VideoOptions;
        preview?: PreviewConfig;
        readOnly?: ConditionalProperty;
        renderMembers?: ObjectRenderMembersCallback;
        title?: string;
        type: "sanity.video";
        validation?: ValidationBuilder<VideoRule, VideoValue>;
    }

    Hierarchy

    • Omit<ObjectDefinition, "type" | "fields" | "options" | "groups" | "validation">
      • VideoDefinition
    Index

    Properties

    components?: ObjectComponents
    deprecated?: DeprecatedProperty
    description?: string | Element
    fields?: FieldDefinition<
        | "string"
        | "number"
        | "boolean"
        | "object"
        | "array"
        | "block"
        | "date"
        | "datetime"
        | "document"
        | "file"
        | "geopoint"
        | "image"
        | "reference"
        | "crossDatasetReference"
        | "globalDocumentReference"
        | "slug"
        | "text"
        | "url"
        | "email"
        | "sanity.video",
        undefined,
    >[]
    fieldsets?: FieldsetDefinition[]
    icon?: ComponentType | ReactNode
    initialValue?: InitialValueProperty<any, VideoValue>
    name: string
    options?: VideoOptions
    preview?: PreviewConfig

    Callback that allows developers to customize the members of the object input. It can be used to add decoration members to the object input, instead of using empty fields. For example:

    import { Decoration } from './Decoration'

    renderMembers: (members) => {
    return [
    ...members,
    {
    key: 'decoration',
    kind: 'decoration',
    component: Decoration,
    },
    ]
    title?: string
    type: "sanity.video"