@codegloss/vue
v1.0.0
Published
Vue 3 wrapper for the codegloss <code-gloss> web component
Maintainers
Readme
@codegloss/vue
Vue 3 wrapper for the codegloss
<code-gloss> Web Component.
npm install @codegloss/vue codeglosscodegloss is a peer dependency.
Usage
<script setup lang="ts">
import { CodeGloss } from '@codegloss/vue';
</script>
<template>
<CodeGloss
code="function fib(n) { return n < 2 ? n : fib(n-1) + fib(n-2); }"
lang="js"
filename="fib.js"
:annotations="[
{ id: 'a1', token: 'fib', line: 0, occurrence: 0,
title: 'Recursion', text: 'Calls itself with smaller inputs.' },
]"
/>
</template>The component forwards the full <code-gloss> prop surface — annotations,
connection arcs, per-block theme, callouts, arcs, and a highlight
function for pre-tokenized output.
Documentation
Full component API and live previews at https://lurx.github.io/codegloss/.
