Open History to see the last commit
1---
2title: Chat UI packages
3id: migrate-create-ui
4order: 5
5description: "Move from @tanstack/ai-*-ui to the framework /ui subpath."
6keywords:
7 - tanstack ai
8 - migration
9 - deprecation
10---
11
12Change your import from `@tanstack/ai-react-ui` to `@tanstack/ai-react/ui`. The same move applies to Solid and Vue.
13
14> **Deprecated.** `@tanstack/ai-react-ui`, `@tanstack/ai-solid-ui`, and `@tanstack/ai-vue-ui` re-export the new `/ui` subpath until each package's `1.0.0`. `npm install` prints a warning. Import from `/ui` in new code. Svelte never published a `*-ui` package. Use `@tanstack/ai-svelte/ui`.
15
16```diff
17- import { Chat, ChatMessages, ChatInput } from '@tanstack/ai-react-ui'
18+ import { Chat, ChatMessages, ChatInput } from '@tanstack/ai-react/ui'
19```
20
21Nothing else changes for the package move. `Chat`, `ChatMessages`, `ChatMessage`, `ChatInput`, `ToolApproval`, `TextPart`, and `ThinkingPart` stay on the subpath until `1.0.0`. `TextPart` markdown plugins did change. See [TextPart markdown](./text-part-markdown).
22
23`useChat` is not re-exported from the shim. Import it from `@tanstack/ai-react`, or the matching framework package.
24
25## Why
26
27A separate `*-ui` package split chat UI from the framework package. Form uses `createFormHook` on `@tanstack/react-form`. Table uses `createTableHook` on `@tanstack/react-table`. Chat now sits on `@tanstack/ai-react/ui` for the same reason.
28
29## Minimum versions
30
31New imports:
32
33- `@tanstack/ai-react` (next minor) `/ui`
34- `@tanstack/ai-solid` (next minor) `/ui`
35- `@tanstack/ai-vue` (next minor) `/ui`
36- `@tanstack/ai-svelte` (next minor) `/ui`
37- `@tanstack/ai-preact` (next minor) `/ui`
38- `@tanstack/ai-octane` (next minor) `/ui`
39- `@tanstack/ai-angular` (next minor) `/ui`
40- `@tanstack/ai-remix` (next minor) `/ui`
41
42Deprecated re-exports, removed in `1.0.0`:
43
44- `@tanstack/ai-react-ui` 0.9.0
45- `@tanstack/ai-solid-ui` 0.8.0
46- `@tanstack/ai-vue-ui` 0.3.0
47
48## Coexistence
49
50Old `*-ui` packages and new `/ui` imports can live in the same app until `1.0.0`. Do not mix them in one chat tree.
51
52## Typed chat UI
53
54The `/ui` subpath also exports `createChatHook`, a typed headless chat UI that derives tool, part, and interrupt components from your chat options. It is new, not a replacement you need to move to. The components above keep working. See the [React UI guide](../ui/react) for how it fits together, and [Solid](../ui/solid), [Vue](../ui/vue), [Svelte](../ui/svelte), [Preact](../ui/preact), [Octane](../ui/octane), [Remix](../ui/remix), or [Angular](../ui/angular) for the other adapters.