@wdns/vue-code-block

Vue 3 CodeBlock - Highlight your code with ease using this syntax highlighting component powered by PrismJS or Highlight.js.
422,578 53
Install
npm install @wdns/vue-code-block
Latest Version:2.4.1
Vue:3
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  npm
Maintainer: webdevnerdstuff

Vue

Vue 3 CodeBlock

NPM Package   @WebDevNerdStuff

Description

The Vue 3 CodeBlock component leverages the power of PrismJS or Highlight.js to provide syntax highlighting for code blocks within your application. The component takes a prop, which is the code to be highlighted, and uses PrismJS or Highlight.js to render the code with syntax highlighting. The component supports a variety of programming languages and can be customized with different themes to match your application's design. With this component, your users can display their code snippets with ease and clarity, making it easier to share and collaborate on code within your application.

Installation

Using pnpm:

pnpm add @wdns/vue-code-block

Using npm:

npm i @wdns/vue-code-block

Documentation

Documentation & Demo

Dependencies

PrismJS
Highlight.js
Vue 3
UAParser.js

Change Log

Releases

License

Copyright (c) 2023 WebDevNerdStuff
Licensed under the MIT license.

Related Packages

vue3-highlight-component

With vue3-highlight-component, you can highlight code blocks within your applica...

1,367 2
um-note

基于prismjs和vue3的语法高亮组件,支持编辑和提交! Syntax highlighting component ba...

6,036 2
vue-highlightjs

Syntax highlighting with highlight.js for Vue.js 2.x

445,320 336
vue-highlight.js

Highlight.js syntax highlighter component for Vue.

60,107 207
vue-hljs-with-line-number

Syntax highlighting with highlight.js for Vue.js 2.x

811

Version History

Version Released License
2.4.1 MIT
2.4.0 MIT
2.3.5 MIT
2.3.4 MIT
2.3.3 MIT