Integrate Markstream using Svelte 5 runes and SvelteKit-safe browser boundaries.
Use for Svelte 5 or SvelteKit package setup, streaming state, workers, or scoped custom components. Svelte 4 is unsupported.
Before changing dependencies or source files, inspect the existing package manager and project conventions, preview the intended edits, and obtain explicit user approval.
<MarkdownRender {content} /> and smooth streaming auto.final, disable pacing/cursor, and enable fade only if desired.nodes only for worker-owned parsing or shared AST state.$props() and callbacks. Configure KaTeX or Mermaid workers only when requested.customComponents; use scoped registration only when sharing is intentional.svelte-check, build, or e2e.<script lang="ts">
import MarkdownRender from 'markstream-svelte'
import 'markstream-svelte/index.css'
let { content, isDone }: { content: string; isDone: boolean } = $props()
</script>
<MarkdownRender
{content}
final={isDone}
fade={isDone}
typewriter={!isDone}
smoothStreaming={isDone ? false : 'auto'}
htmlPolicy="safe"
/>
Keep safe HTML and strict Mermaid defaults. Review dependencies and never run browser-only peers during SSR.