Skip to content

Preview

<Preview> renders page content using a Runtime instance.

Minimal Example

vue
<template>
    <Preview :app="runtime" />
</template>

<script setup>
import { useRuntimeApp, Preview } from '@ptahjs/ui-vue';

const runtime = useRuntimeApp({ id: 've1' });
runtime.schema(pageJson);
</script>

useRuntimeApp

useRuntimeApp({ id }) creates a runtime instance for preview mode.

Requirements

  • Resource registration through createPtah()
  • A valid renderer config
  • Schema loaded through runtime.schema(data)