@uxbert-labs/cms-preview
v0.1.1
Published
BlockRenderer, live-preview bridge and draft hydration for sites powered by the UXBERT Labs CMS.
Downloads
277
Maintainers
Readme
@uxbert-labs/cms-preview
React building blocks for rendering UXBERT Labs CMS pages on your site — and making them editable with keystroke-live preview.
pnpm add @uxbert-labs/cms-preview<BlockRenderer entry={page} components={registry} />— renders a page entry's blocks through YOUR components. The site owns the design system; the CMS owns content, order and media.usePreviewBridge()— mount inside your/preview/$slugroute: receives draft updates from the CMS editor iframe via postMessage and re-renders on every keystroke.- Draft hydration helpers — resolve draft references/assets the same way the delivery API does, so preview and production render identically.
The preview route is your real site (same components, same CSS) — there is no separate
rendering engine. See the CMS docs for the /preview route recipe.
Peer dependency: react >= 19.
