A Vue 3 component for rendering Markdown content using the marked library. Current stable version is 1.3.0, released with a focus on Vue 3 composition API and TypeScript support. It provides a declarative way to parse and display Markdown directly in Vue templates, with built-in syntax highlighting and custom renderer options. Unlike other Vue-markdown libraries, marked-vue is built on top of the highly optimized marked parser and offers seamless integration with Vue's reactivity system. It supports slot-based customization and is actively maintained with regular updates aligned with marked's release cadence.
npm install marked-vueVerified import paths — ran on the pinned version, not inferred.
Shows basic usage of the MarkedVue component to render Markdown as HTML in a Vue 3 app.
Replace `source` with `value` in the template: <MarkedVue :value="..." />
Use `createMarkedVue({...})` to create a custom instance and pass it via prop.Use `const MarkedVue = require('marked-vue').default` or switch to ESM.Upgrade to Vue 3 or pin to version 1.1.x if using Vue 2.
Use `const MarkedVue = require('marked-vue').default` or switch to ES module import.Add `const markdownContent = ref('...')` and use `:value="markdownContent"`.Run `npm install marked` to install the peer dependency.
Use either ESM imports/exports or CommonJS, but not both in the same file.