Markstream Vue 3
Overview
Configure the Vue 3 renderer beyond generic installation: surface modes, streaming lifecycle, code rendering, long-message virtualization, and scoped overrides.
When to Use
Use for a plain Vue 3 application after the package has been selected. Use markstream-nuxt when SSR-specific Nuxt boundaries matter.
Workflow
Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.
- Confirm Vue 3 and not Nuxt. Install only requested peers and import
markstream-vue/index.css after resets.
- Start with
content. Use mode="chat" for AI streams, docs for rich documents, and minimal for lightweight non-chat surfaces.
- Choose fenced-code rendering explicitly:
pre without a peer, shiki with stream-markdown, or compatibility-named monaco backed by stream-diffs.
- For live chat use smooth streaming
auto, no fade, and an optional cursor. On completion keep the same mode, set final, and disable pacing/cursor.
- Use
nodes only for worker parsing or structural AST ownership.
- For long transcripts, keep an existing outer message virtualizer in charge. Use Markstream logical height rather than mounted DOM height.
- Use scoped component registration and preserve safe HTML and Mermaid strict mode.
- Validate the smallest build/typecheck plus one incremental stream and one long-message case.
Example
<script setup lang="ts">
import MarkdownRender from 'markstream-vue'
import 'markstream-vue/index.css'
defineProps<{ content: string; isDone: boolean }>()
</script>
<template>
<MarkdownRender
mode="chat"
:content="content"
:final="isDone"
:fade="isDone"
:typewriter="!isDone"
:smooth-streaming="isDone ? false : 'auto'"
html-policy="safe"
/>
</template>
Limitations
- Optional peers add bundle and browser-runtime cost.
- DOM-minimal mode disables wrapper-dependent features.
- Virtualization integration requires stable content and measurement keys.
Security & Safety Notes
Review dependency changes. Never enable trusted HTML or loose Mermaid rendering for untrusted model output.
1---2name: markstream-vue3description: "Integrate markstream-vue into plain Vue 3 with renderer modes, code and DOM choices, streaming state, virtualization, optional peers, and scoped components."4category: frontend5risk: critical6source: https://github.com/Simon-He95/markstream-vue/tree/main/.agents/skills/markstream-vue7source_repo: Simon-He95/markstream-vue8source_type: official9date_added: "2026-07-21"10author: Simon-He9511tags: [vue, markdown, streaming, virtualization, ai-chat]12tools: [claude, cursor, gemini, codex]13license: MIT14license_source: https://github.com/Simon-He95/markstream-vue/blob/main/license15metadata:16 source: https://skillmd.com/skills/mhassan0000/markstream-vue17---1819# Markstream Vue 32021## Overview2223Configure the Vue 3 renderer beyond generic installation: surface modes, streaming lifecycle, code rendering, long-message virtualization, and scoped overrides.2425## When to Use2627Use for a plain Vue 3 application after the package has been selected. Use `markstream-nuxt` when SSR-specific Nuxt boundaries matter.2829## Workflow3031Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.32331. Confirm Vue 3 and not Nuxt. Install only requested peers and import `markstream-vue/index.css` after resets.342. Start with `content`. Use `mode="chat"` for AI streams, `docs` for rich documents, and `minimal` for lightweight non-chat surfaces.353. Choose fenced-code rendering explicitly: `pre` without a peer, `shiki` with `stream-markdown`, or compatibility-named `monaco` backed by `stream-diffs`.364. For live chat use smooth streaming `auto`, no fade, and an optional cursor. On completion keep the same mode, set `final`, and disable pacing/cursor.375. Use `nodes` only for worker parsing or structural AST ownership.386. For long transcripts, keep an existing outer message virtualizer in charge. Use Markstream logical height rather than mounted DOM height.397. Use scoped component registration and preserve safe HTML and Mermaid strict mode.408. Validate the smallest build/typecheck plus one incremental stream and one long-message case.4142## Example4344```vue45<script setup lang="ts">46import MarkdownRender from 'markstream-vue'47import 'markstream-vue/index.css'4849defineProps<{ content: string; isDone: boolean }>()50</script>5152<template>53 <MarkdownRender54 mode="chat"55 :content="content"56 :final="isDone"57 :fade="isDone"58 :typewriter="!isDone"59 :smooth-streaming="isDone ? false : 'auto'"60 html-policy="safe"61 />62</template>63```6465## Limitations6667- Optional peers add bundle and browser-runtime cost.68- DOM-minimal mode disables wrapper-dependent features.69- Virtualization integration requires stable content and measurement keys.7071## Security & Safety Notes7273Review dependency changes. Never enable trusted HTML or loose Mermaid rendering for untrusted model output.