Skip to content

AdminLivePreviewConfigInput

Defined in: packages/core/src/livePreview/types.ts:134

User-facing input for a collection or global’s admin.livePreview block.

TDoc extends Partial<VexDocument> = Partial<VexDocument>

The exact generated document interface this collection/global’s url resolver receives — see LivePreviewUrlResolver.

optional breakpoints?: LivePreviewBreakpoint[]

Defined in: packages/core/src/livePreview/types.ts:170

Overrides the root livePreview.breakpoints for this collection/global’s own panel only. You are very likely looking for the root-level livePreview.breakpoints instead — set there once, it applies to every collection/global that declares admin.livePreview.url. Override here only for the rare collection whose previewed layout genuinely needs different simulated widths than the rest of the project.


optional debounceMs?: number

Defined in: packages/core/src/livePreview/types.ts:154

Milliseconds useLivePreviewSync waits after the last form change before posting an update.

DEFAULT_LIVE_PREVIEW_DEBOUNCE_MS (150ms)


optional defaultOpen?: boolean

Defined in: packages/core/src/livePreview/types.ts:161

Whether the preview panel starts open before the editor has ever made an explicit choice. The consolidated admin cookie’s livePreview.panelOpen field (Decision 51) remembers an explicit choice once made and always wins over this default.

false


url: LivePreviewUrl<TDoc>

Defined in: packages/core/src/livePreview/types.ts:148

The document’s public preview URL, as a literal path for a collection or global that always previews at one place (url: "/"), or a resolver for one whose URL depends on the document.

Declared with method syntax, not url: LivePreviewUrlResolver<TDoc>, so the parameter is checked bivariantly: a CollectionConfig<…, TSlug> with a still-generic TSlug has to stay assignable to the concrete union form the admin views hold, and a property-position function type makes TDoc strictly contravariant, which breaks exactly that assignment.