AiJsxPreview

JSX Preview

Render AI-generated markup live during streaming, auto-closing incomplete tags.

Weather in Madrid

28°C · Sunny

  • Humidity: 34%
  • Wind: 12 km/h

Usage

<AiJsxPreview :content="streamedMarkup">
  <template #default="{ html }">
    <div class="prose" v-html="html" />
  </template>
</AiJsxPreview>

Props

Prop Type Default Description
contentstring''Markup to render (may be incomplete while streaming)
streamingbooleantrueAuto-close tags cut off mid-stream
sanitize(html: string) => stringOverride the default markup sanitizer

Slots

  • default