# ViteHub UI

`@vite-hub/ui` gives you the Vue and Nuxt components of the ViteHub Console. Start with a full Console block, then connect your data.

The package draws the UI. Your app sends and stores data and checks access. Every example uses fake data, makes no network requests, and shows its source below.

## A Console with the defaults

Select a session to read and reply. This example uses the default styles and layouts.

_Interactive preview available on the rendered documentation page._


[Install the package](https://vitehub.dev/docs/ui/installation) and copy the [Chat app](https://vitehub.dev/docs/ui/blocks/chat-app), [Code review](https://vitehub.dev/docs/ui/blocks/code-review), or [Collaborative editor](https://vitehub.dev/docs/ui/blocks/collaborative-editor) into your app. Each block shows how to connect real data.

## Components

- **Console:** [Chat app](https://vitehub.dev/docs/ui/blocks/chat-app), [Code review](https://vitehub.dev/docs/ui/blocks/code-review), [Collaborative editor](https://vitehub.dev/docs/ui/blocks/collaborative-editor)
- **Parts:** [Message](https://vitehub.dev/docs/ui/message), [Bubble](https://vitehub.dev/docs/ui/bubble), [Marker](https://vitehub.dev/docs/ui/marker), [Attachment](https://vitehub.dev/docs/ui/attachment), [Trace](https://vitehub.dev/docs/ui/trace), [Code block](https://vitehub.dev/docs/ui/code-block)
- **Chat:** [Chat](https://vitehub.dev/docs/ui/chat), [Chat message](https://vitehub.dev/docs/ui/chat-message), [Message parts](https://vitehub.dev/docs/ui/message-parts), [Markdown](https://vitehub.dev/docs/ui/markdown), [Markdown Editor](https://vitehub.dev/docs/ui/markdown-editor), [Prompt input](https://vitehub.dev/docs/ui/prompt-input), [Filter search](https://vitehub.dev/docs/ui/filter-search), [Chat session](https://vitehub.dev/docs/ui/chat-session)
- **Collaboration:** [Comments](https://vitehub.dev/docs/ui/comments), [Avatar stack](https://vitehub.dev/docs/ui/avatar-stack), [Connection status](https://vitehub.dev/docs/ui/connection-status), [Sync status](https://vitehub.dev/docs/ui/sync-status), [Carets](https://vitehub.dev/docs/ui/carets)
- **Agent work:** [Tool list](https://vitehub.dev/docs/ui/tool-list), [Diff](https://vitehub.dev/docs/ui/diff), [Code view](https://vitehub.dev/docs/ui/code-view), [File tree](https://vitehub.dev/docs/ui/file-tree)
- **Utilities:** [Attachments](https://vitehub.dev/docs/ui/attachments), [Message scroller](https://vitehub.dev/docs/ui/message-scroller)

## What each layer owns

| Concern | Owner |
| ------- | ----- |
| Message contracts and transport | AI SDK or your ViteHub Agent route |
| Scroll intent and message jumps | ViteHub headless Vue primitives |
| Tokens and basic controls | Nuxt UI |
| Chat, sessions, Agent views, Markdown, attachments | ViteHub UI |
| Diffs and path-first file trees | Pierre |

The package does not send messages. Use `useChat()` from `@ai-sdk/vue` or from `vite-hub/agent/vue`, then pass its values to the components.

## Entry points

| Import                    | Use it for                                                                     |
| ------------------------- | ------------------------------------------------------------------------------ |
| `@vite-hub/ui`            | Styled components, composables, and display and Pierre diff helpers. |
| `@vite-hub/ui/<name>`     | One component family, such as `@vite-hub/ui/chat`. |
| `@vite-hub/ui/headless`   | Message scroller and Choices input parts, without styles or Nuxt UI. |
| `@vite-hub/ui/choices-input` | The headless Choices input parts of `FilterSearch`. |
| `@vite-hub/ui/vite`       | Vite plugin for Vue apps. Configures Nuxt UI and Comark. |
| `@vite-hub/ui/styles.css` | Stylesheet. Load it after Tailwind CSS and Nuxt UI. |

<!-- vitehub-docs:section-links -->
## In this section

- Start
  - [Overview](https://vitehub.dev/raw/docs/ui.md) (this page)
  - [Get started](https://vitehub.dev/raw/docs/ui/get-started.md)
  - [Installation](https://vitehub.dev/raw/docs/ui/installation.md)
- [Blocks](https://vitehub.dev/raw/docs/ui/blocks/chat-app.md)
- [Parts](https://vitehub.dev/raw/docs/ui/message.md)
- [Chat](https://vitehub.dev/raw/docs/ui/chat.md)
- [Collaboration](https://vitehub.dev/raw/docs/ui/avatar-stack.md)
- [Agent work](https://vitehub.dev/raw/docs/ui/tool-list.md)
- [Utilities](https://vitehub.dev/raw/docs/ui/attachments.md)

Next: [UI_R0001](https://vitehub.dev/raw/docs/ui/diagnostics/ui_r0001.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
