Sanity Library Reference Docs
    Preparing search index...

    Interface useDocumentPreviewOptions

    interface useDocumentPreviewOptions {
        dataset?: string;
        documentId: string;
        documentType: string;
        liveEdit?: boolean;
        perspective?: ReleasePerspective | ClientPerspective;
        projectId?: string;
        ref?: RefObject<unknown>;
        source?: DocumentSource;
        sourceName?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    dataset?: string
    documentId: string
    documentType: string
    liveEdit?: boolean

    Indicates whether this document uses liveEdit mode. When true, the document does not use the draft/published model and edits are applied directly to the document.

    perspective?: ReleasePerspective | ClientPerspective
    projectId?: string
    ref?: RefObject<unknown>

    Optional ref object to track visibility. When provided, preview resolution only occurs when the referenced element is visible in the viewport.

    Explicit source object to use for this operation.

    sourceName?: string

    The name of the source to use for this operation.