Skip to content

usePreviewField

usePreviewField(): (key) => PreviewFieldAttributes

Opt an element into a field pin: <h1 {...field('headline')}>. Returns {} outside a live preview, so production markup is byte-for-byte what it was — the mark exists only while Composer is framing the page.

(key) => PreviewFieldAttributes