easy token generation for Vue 3
pnpm add -D @itsy/token
<script setup>
import { Token } from '@itsy/token'
</script>
<template>
<token>
<h1>Hello world</h1>
</token>
</template>
Used to provide the DOM to be processed. When component
is used, it instead will provide output via a slot-prop code
.
This prop will be watch
ed and update the token when changes occur. Can be f.ex an array of refs, or a single reactive.
The language Shiki will use to style the token output
Will use Shiki to style the token output
Advanced use; takes a template ref that refers to the element to be tokenized
The Token component uses this function, it's provided for full-manual control over input/output if needed.