What is Vue TermUI?
mainVue TermUI is a custom Vue 3 renderer that allows you to build Terminal User Interfaces (TUIs) using standard Vue patterns. Instead of rendering to the DOM, components render to the terminal using real flexbox layouts, styled text, and support for keyboard/mouse input and focus management.
If you are familiar with Vue, you can use the Composition API, refs, computeds, slots, and directives like v-if, v-for, and v-model to build interactive terminal applications.
<script setup lang="ts">
import { Box, Text, useInterval, ref } from 'vue-termui'
const count = ref(0)
useInterval(() => count.value++, 1000)
</script>
<template>
<Box border borderStyle="rounded" :padding="1">
<Text bold fg="#42b883">Uptime: {{ count }}s</Text>
</Box>
</template>