Works out of the box
Install the component and Shiki. One import gives you a themed, highlighted block with no plugin required.
Pluggable engines, semantic themes, deterministic SSR, and a simple API for everyday code blocks.
npm install vue-syntax-highlighter shikipnpm add vue-syntax-highlighter shikiyarn add vue-syntax-highlighter shikibun add vue-syntax-highlighter shikiImport the stylesheet once:
import 'vue-syntax-highlighter/styles.css'Then render:
<script setup lang="ts">
import { SyntaxHighlighter } from 'vue-syntax-highlighter'
const code = 'const answer = 42'
</script>
<template>
<SyntaxHighlighter :code="code" language="javascript" />
</template>That is the whole zero-configuration path: Shiki is the default engine, vsh-light is the default theme, and no provider or plugin is required.
Read the Quick Start · Basic Usage · Advanced Usage
Coupling themes to engine output makes theme switches expensive and makes server rendering unpredictable. This library keeps tokenization independent from appearance:
// Engine output: text + semantic type only.
{ text: 'const', type: 'keyword' }
// Appearance: CSS custom properties selected by scheme.
// --vsh-light-token-keyword-color / --vsh-dark-token-keyword-colorThat one decision makes the cache theme-independent, keeps SSR markup small, and lets every adapter share the same theme system.