Pierre Words for Svelte

Render static or streaming Markdown in Svelte with incremental DOM updates and optional syntax highlighting.

Unofficial Svelte integration by Bhide Svelte. Built on Pierre Words.

Installation

pnpm add @sv-pierre/words

Features

Stream partial Markdown as it arrives and update only the DOM that changed.

  • Parse CommonMark, GFM, tables, task lists, and footnotes.
  • Add syntax highlighting and line numbers when needed.
  • Enable math, CJK support, incomplete parsing, or streaming carets.

Usage

code.svelte
<script lang="ts">	import { Markdown } from '@sv-pierre/words';</script>
<Markdown source="# Hello, **Svelte**" />

Examples

Markdown text

Pass a Markdown string to source and render it as HTML.

Markdown with code

Add the Pierre Highlights plugin to render fenced code blocks with light and dark themes.

AI chat

Pass the full response received so far and keep streaming enabled until the response ends.

Streaming Markdown with code

Combine streaming, incomplete Markdown parsing, and light/dark syntax highlighting in one response.

Missing something? DM me on X. Found a bug? Open an issue.

Credits

Built on Pierre Words and Pierre Highlights. This project is not maintained or endorsed by Pierre.