markdown-svelte
v0.1.0
Published
A secure, typed Markdown renderer for Svelte 5.
Maintainers
Readme
markdown-svelte
A typed Markdown renderer for Svelte 5 with streaming support and customizable styles.
Playground · Documentation · Examples
Install
npm install markdown-svelteRequires svelte ^5.57.1.
Usage
<script lang="ts">
import { MarkdownViewer } from 'markdown-svelte'
</script>
<MarkdownViewer markdown="# Hello, **Svelte**!" />For parsed node arrays, use MarkdownRenderer from markdown-svelte. It accepts
nodes and renders updates without animation.
Use MarkdownStream from markdown-svelte/stream to animate incoming node updates.
Both components accept the same props. See the
worker example for incremental parsing.
Customize the appearance with CSS variables and element classes. See the styling guide.
Raw HTML is disabled by default. Set allowRawHtml to render sanitized HTML.
Development
cp .env.example .env
bun install
bun run devRun bun run check and bun run test to validate changes. bun run build builds the site and package.
Set PUBLIC_BASE_URL in the deployment environment when building the documentation site.
License
MIT
