Skip to content

vue-terminal/syntax-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f487345 · Dec 16, 2022

History

10 Commits
Dec 16, 2022
Dec 16, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022
Dec 16, 2022
Dec 1, 2022
Dec 16, 2022
Dec 16, 2022
Dec 1, 2022
Dec 1, 2022
Dec 1, 2022

Repository files navigation

syntax-highlight

Syntax highlight component for vue-termui.

Install

npm install @vue-termui/syntax-highlight

Usage

<script lang="ts" setup>
  improt { TuiBox } from 'vue-termui'
  import SyntaxHighlight from '@vue-termui/syntax-highlight'

  const code = `const hello = 'world'`
</script>

<template>
  <TuiBox>
    <SyntaxHighlight :code="code" />
  </TuiBox>
</template>

Props

code

  • Type: string

Source code to highlight.

lang

theme

Credits

Syntax Highlight is based on Shiki