Skip to content

Playground ​

This repository includes a playable demo under /playground that helps you test features locally and reproduce rendering issues.

Online Playgrounds ​

Running Locally ​

How to run the playground locally:

bash
pnpm install
pnpm play
# Open the dev server shown in terminal (usually http://localhost:5173)

The playground demonstrates:

  • Live streaming Markdown input with progressive Mermaid diagrams
  • Custom components mapping and setCustomComponents
  • stream-diffs streaming integration and code block examples

Example pages (open from the playground):

  • https://markstream-vue.simonhe.me/test — shareable repro page for stress-testing streaming features (hosted demo)
  • https://markstream-react.pages.dev/migration-demo — hosted before/after migration demo for react-markdown users
  • /markdown — Markdown vs static rendering comparison

Playground demo

If you want to add examples to the playground for documentation pages, keep them minimal and focused (the playground/src/pages folder is a good place to add pages).

Quick try — add a simple playground page by creating playground/src/pages/quick-test.vue and pasting a small test like:

vue
<script setup lang="ts">
import 
MarkdownRender
from 'markstream-vue'
const
md
= '# Quick playground test\n\nThis is a demo.'
</script> <template> <
MarkdownRender
:content
="
md
" />
</template>

Octane playground ​

Try the online Octane playground. The source is in playground-octane. Run it locally from the repository root:

bash
pnpm install
pnpm play:octane
# http://localhost:4176

The Octane playground mirrors the React playground: streaming conversation controls, themes, a custom thinking node, workers, and the /test regression lab, rendered through octane and markstream-octane.

Solid playground ​

Try the online Solid playground. The source is in playground-solid. Run it locally from the repository root:

bash
pnpm install
pnpm play:solid
# http://localhost:4178

Use Controls, TPS/random chunk delivery, themes, pause/resume, source editing, full restoration, long documents, HTML/SVG and diagram examples. /line-number-handoff-check checks the pre → highlight handoff.