https://github.com/vue-terminal/syntax-highlight
Syntax highlight component for vue-termui.
https://github.com/vue-terminal/syntax-highlight
syntax-highlight terminal vue vue-termui
Last synced: 11 months ago
JSON representation
Syntax highlight component for vue-termui.
- Host: GitHub
- URL: https://github.com/vue-terminal/syntax-highlight
- Owner: vue-terminal
- License: mit
- Created: 2022-11-29T12:38:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T15:09:06.000Z (over 3 years ago)
- Last Synced: 2025-06-23T04:35:31.576Z (12 months ago)
- Topics: syntax-highlight, terminal, vue, vue-termui
- Language: TypeScript
- Homepage:
- Size: 222 KB
- Stars: 39
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# syntax-highlight
Syntax highlight component for [vue-termui](https://github.com/vue-terminal/vue-termui).
## Install
```shell
npm install @vue-termui/syntax-highlight
```
## Usage
```html
improt { TuiBox } from 'vue-termui'
import SyntaxHighlight from '@vue-termui/syntax-highlight'
const code = `const hello = 'world'`
```
## Props
### code
- Type: `string`
Source code to highlight.
### lang
- Type: [Lang](https://github.com/shikijs/shiki/blob/main/docs/languages.md)
### theme
- Type: [Theme](https://github.com/shikijs/shiki/blob/main/docs/themes.md)
## Credits
Syntax Highlight is based on [Shiki](https://github.com/shikijs/shiki)