You are an expert on the tool-ui-vue (VTU) Vue 3 component library — a Vue 3 + Zod + Tailwind CSS v4 component toolkit for agent tool-call UIs.
Stack: Vue 3 + TypeScript + Zod + Tailwind CSS v4
Monorepo layers:
@lionad/vtu-components— 27 tool-specific components (charts, maps, social posts, code blocks, etc.) + built-in core primitives, i18n, design tokens@lionad/vtu-renderer— JSON-driven component rendering@lionad/vtu-server— MCP server exposing component data
Core rules (always follow)
- Component root elementUse
cmpt-kebab-case identifiers (e.g.cmpt-data-table) with thedata-tool-ui-idattribute - Data validationVia Serializable Zod schemas (JSON-safe), at runtime via the Props interface (including css + callbacks)
- Style overridesVia the
cssprop (Tailwind class string), without modifying component source code - Default Chinese locale (zh-CN), automatically registered when the component is imported; switch to English via
registerEnglish()Switch to English - Headless architecture — component logic lives in the
states/composable,index.vueonly binds the view
How to use this skill
Load reference files on demand; do not read them all at once. Consult the corresponding file in the routing table based on the user's question.
Reference files
Quick reference
references/components.md— component index (27 components, grouped by category)
Guide
references/guidelines/conventions.md— naming conventions, directory structure, TypeScript patterns, CSS prop systemreferences/guidelines/schema-contracts.md— Zod schema patterns, Contract system, Serializable vs Props, Action/Decision patternsreferences/guidelines/theming.md— Token system, CSS variables, dark mode, css prop overridesreferences/guidelines/i18n.md— LocaleProvider, useI18n, registerEnglish, component-level i18n
Recipes
references/recipes/component-usage.md— installation, basic usage, event handling, peer dependenciesreferences/recipes/headless-states.md— customizing UI with states/ composablesreferences/recipes/json-rendering.md— Renderer package, Catalog + Registry, error boundariesreferences/recipes/mcp-server.md— MCP Server installation (Claude Code / Cursor / Windsurf)
Routing table
| User question | Load file |
|---|---|
| "What components are there? / Which component should I use?" | references/components.md |
| "How do I name things? / File structure?" | references/guidelines/conventions.md |
| "How do I define a schema? / parse and safeParse?" | references/guidelines/schema-contracts.md |
| "How do I change colors? / dark mode?" | references/guidelines/theming.md |
| "How do I switch languages?" | references/guidelines/i18n.md |
| "How do I install it? / How do I use it?" | references/recipes/component-usage.md |
| "I want to customize the UI / use only the logic" | references/recipes/headless-states.md |
| "JSON rendering / dynamic rendering" | references/recipes/json-rendering.md |
| "The styles are broken" | references/guidelines/theming.md + references/recipes/component-usage.md troubleshooting in |
| "LLM/AI integration" | references/guidelines/schema-contracts.md + references/recipes/json-rendering.md |
| "MCP server / install server" | references/recipes/mcp-server.md |
Installation
pnpm add @lionad/vtu-components
In the entry CSS file, add after @import "tailwindcss" :
@import "@lionad/vtu-components/style.css";
Projects not using Tailwind are not currently supported (components rely on Tailwind utility classes to generate layout styles).
Quick start
<script setup lang="ts">
import { CodeBlock } from '@lionad/vtu-components'
import type { SerializableCodeBlock } from '@lionad/vtu-components'
const data: SerializableCodeBlock = {
code: "console.log('hello')",
language: 'javascript',
filename: 'hello.js',
lineNumbers: true,
}
</script>
<template>
<CodeBlock v-bind="data" />
</template>