Best AI Chat UI Libraries in 2026, Compared
A dated comparison of AI chat UI libraries (assistant-ui, Deep Chat, Loquix, kitn, ChatKit, AI Elements): Web Components or React, your backend, generative UI.
If you are choosing a chat UI library for an LLM product, the libraries below are the ones you will shortlist. This page says what each is good at and where aparté differs — including the cases where you should pick the other one. Claims about other projects were checked against their public docs and npm packages in October 2026; the weights below, and the AI Elements, assistant-ui, ChatKit and TanStack AI rows, were re-checked in November 2026. They move fast, so verify before deciding. One change to know before you read on: Vercel’s AI Elements announces on its own site that it will be deprecated at the end of November 2026 (details below).
The short version: aparté is the one that is a complete runtime and framework-agnostic and free of third-party dependencies. The React kits have the larger ecosystems. Two of the other web-component kits here, Loquix and kitn, are presentational — you bring the loop. If you need neither framework freedom nor a runtime, you have better options than aparté, and they are named below.
What a working chat weighs
Section titled “What a working chat weighs”Every library below set up the same way: the chat its docs’ quickstart builds, streaming a model’s reply, bundled and gzipped. The bar is what a page downloads before the chat can answer; the line under it says what that UI holds, and the method under the chart is measured by a script anyone can run again.
Measured on 2 November 2026 with esbuild 0.27.7: minified, code splitting on, what loads at startup, gzip level 9; every library at its latest version published before 3 November 2026. Loquix and Deep Chat keep their component styles inside their JavaScript; assistant-ui's CSS comes out of your own Tailwind build and is not counted. CopilotKit's build also splits off 2.9 MB of optional chunks (a grammar per highlighted language, diagrams, a developer inspector), fetched only when a reply needs one. A server is never counted. The script that measures it ↗
At 142 KB, aparté is heavier than Deep Chat (120 KB) and than Loquix (27 KB, which ships no model client), and lighter than the two React kits, whose bars carry React. Against Loquix, the difference is the model client, the loop and the approval gate; Deep Chat, which also carries its own clients, is the lighter of the two complete options.
The matrix
Section titled “The matrix”AI Elements is in the matrix as it stands today; its own site announces its deprecation at the end of November 2026 (below). Where a cell says not measured, that row was not verified for that library, and we do not guess.
| Criterion | aparté | assistant-ui | AI Elements | deep-chat | Loquix | kitn |
|---|---|---|---|---|---|---|
| Frameworks | Web Components + React, Vue, Svelte, Angular wrappers — tested with React 19, Vue 3.5, Svelte 4 and 5, Angular 19 and 21 | React (Vue bindings in early preview) | React | Web Component (+ React wrapper) | Web Components (Lit) | Web Components (+ React wrappers), built in SolidJS |
| Server-rendered page, hydrated with no error | Tested in CI with Next 15 App Router, Nuxt 3, SvelteKit 2, Angular 21 SSR | not measured | not measured | not measured | not measured | not measured |
| Your framework’s components inside tool calls | React, Vue, Svelte 5, Angular — rendered with your app’s context | Yes, React (tool UI) | Yes, React | not measured | not measured | not measured |
| Tool results as interactive cards (generative UI) | Yes — eleven ready-made cards (weather, products, places, orders…) and defineCard for your own, with buttons and controls that change a card in place | Yes, React: a generative UI guide in its docs | A Tool component shows a call’s state, input and output; richer widgets are your own React | not measured | not measured | Typed cards: confirmations, choices, forms |
| Runtime included (streaming, agent loop, tool calls) | Yes — core + headless engine | Runtime adapters (AI SDK, LangGraph, …) | Via the Vercel AI SDK | Built in, config-driven | No — presentational | No — reads a stream you open (OpenAI, Anthropic) |
| Connects to your own backend (OpenAI-compatible, AG-UI, your endpoint) | Yes — any OpenAI-compatible endpoint, your own /api/chat, an AG-UI agent, an n8n workflow | Yes — runtimes for the AI SDK, AG-UI and others, or a local runtime with an adapter you write | Through the AI SDK: your route returns a UI message stream | Yes — a connect property for your own service, besides direct connections to AI APIs | You write the fetch: no model client | You open the stream (OpenAI or Anthropic format); it renders |
| Weight of a working chat (JavaScript and CSS, gzipped) | 142 KB | 468 KB, React included | not measured: its components are copied into your app | 120 KB | 27 KB, no model client | not measured |
| Framework you must adopt | None — and no third-party dependency in @aparte/core | React | React + the AI SDK | None | None (Lit is bundled) | None |
| Human-in-the-loop: tool approval, typed questions | Approval at the composer, typed elicitation panel | Generic tool UI | Confirmation component | — | Rendered, not run | Rendered, not run |
| Edit / retry / branch a conversation | Yes, with a version picker | Yes | Partial | — | Partial | — |
| Persistence | An IndexedDB adapter in the browser (@aparte/plugin-storage-idb), or a storage interface for your own database | Assistant Cloud (a free tier, then paid), or threads you persist yourself | Your own | — | — | — |
| Theming | CSS variables, light DOM, no fork | Tailwind / shadcn — fork the markup | shadcn — the code lives in your app | Config object | CSS variables | CSS variables (Shadow DOM) |
| Run a model in the browser | Yes — the transformers provider | — | — | Yes (Web LLM) | — | — |
| Scripted demo/test provider | Yes — the scenario provider (deterministic turns: thinking, tools, artifacts) | — | — | Demo mode (canned) | — | — |
| Markdown, code, reasoning | Yes (opt-in plugins) | Yes | Yes | Yes | Yes | Yes |
| Mermaid, KaTeX | Yes — maths and diagrams, drawn as they stream, under any Markdown provider | Yes | Yes | — | — | — |
| Voice | — | Yes (realtime) | Yes | Yes | — | — |
| Slash commands and @ mentions | Yes — any trigger character, submenus, pills | Yes | — | — | — | Yes |
| Citations / sources | Yes — a chip at the end of each cited passage, a card, the source list: OpenAI and OpenRouter annotations, Perplexity, the AI SDK | Partial | Yes | — | Yes | — |
| Floating / modal chat | Yes — <aparte-launcher>: a card, a sheet on a phone | Yes | — | Yes (embed) | Partial | — |
| Best fit for | Multi-framework teams that want the runtime included | React teams, all-in on React | Apps already built on it; new projects should read its move to shadcn/ui first | A config-driven embed, fast | A polished presentational kit (Lit) | A minimal presentational kit |
| Licence | MIT | MIT | Apache-2.0 | MIT | MIT | MIT |
The rows read as what aparté is for: the runtime and the connection to your backend first, the catalogue after. The catalogue is no longer the thin half: aparté draws 66 components, including eleven tool-result cards, charts, maths and diagrams. Where it is still behind is voice, the breadth of React integrations, and the code-oriented parts AI Elements built (sandbox, terminal, workflow graph).
What a wrapper is, and is not. Each wrapper gives you the chat in your framework’s own syntax — props or inputs, slots or snippets, callbacks or outputs, a bindable list of messages, your own components inside tool calls with your app’s context — and the same Web Components draw it underneath. So the chat’s markup is aparté’s, and it is styled through aparté’s CSS variables and classes, not through your framework’s styling system; your components go where the slots and tool calls let them. That is what makes one chat ship in four frameworks, and it is the line a React-only kit does not have to draw.
Which AI chat library is built on Web Components, talks to my backend and shows interactive widgets?
Section titled “Which AI chat library is built on Web Components, talks to my backend and shows interactive widgets?”aparté is built for that combination: Web Components with wrappers for React, Vue, Svelte and
Angular, a connection to any OpenAI-compatible endpoint, your own
/api/chat or an AG-UI agent, and tool results drawn as
interactive cards, the generative UI of a weather forecast, a product or a place.
The nearest alternatives each leave one of the three to you:
OpenAI ChatKit is a web component with interactive widgets, but its server side is an
OpenAI-hosted workflow or a server you build with its Python SDK around OpenAI’s Agents SDK; Deep
Chat is a web component that connects to your own service, but its README documents Markdown and
custom elements, not tool-result cards; and ai-chat-element is a web component with a pluggable
transport for your backend, whose README documents Markdown, code and slots but no tool-call
rendering. Pick one of those if the missing piece does not matter to you.
assistant-ui
Section titled “assistant-ui”The React reference, with Vue bindings in early preview since October 2026 (@assistant-ui/vue, 0.0.x). A composable primitives kit (thread, composer, message, action bar,
branch picker, chain of thought, attachments) with the widest set of runtime integrations
in the category — the Vercel AI SDK, LangGraph, LangChain, Mastra, AG-UI, A2A and more —
plus realtime voice, Mermaid and KaTeX rendering, and an optional hosted cloud, Assistant Cloud
(with a free tier), for thread persistence. The library itself is MIT, and you can persist threads
yourself.
Pick assistant-ui when you are on React for good, want its idioms end to end, and want to plug into one of those runtimes rather than run a loop of your own. Its ecosystem is larger than aparté’s and will stay so.
Pick aparté when the same chat has to ship in more than one framework (or none), when you do not want a UI kit to dictate your styling system, or when you want a runtime in the library rather than an adapter to someone else’s. Theming is the other line: assistant-ui is Tailwind/shadcn, so a visual change is a fork of markup; aparté is CSS variables on light DOM, so it is a stylesheet.
Vercel AI Elements
Section titled “Vercel AI Elements”Being deprecated. Its own site carries a banner: it announces that AI Elements is moving to shadcn/ui and that the project “will be deprecated at the end of November 2026”. The components now live as AI Elements patterns in the shadcn/ui docs (ui.shadcn.com/docs/ai-elements), each a composition of shadcn/ui components that you copy into your project; that page says an existing project does not need to migrate and the code it already copied keeps working. Not every element was rebuilt: the artifact, sandbox, web preview, workflow-graph and voice parts have no shadcn/ui pattern, and that page suggests composing them from shadcn/ui’s own components. If you are choosing a library today, start from those shadcn/ui patterns, not from the AI Elements package this column describes.
The largest catalogue, as it stands. About fifty shadcn components — chatbot, code (artifact, file tree, terminal, sandbox, web preview), voice and workflow-graph families — installed by CLI, so the source lands in your app. They are built for React and the Vercel AI SDK.
Keep using it when you already built on it: copied source does not stop working because the registry ends. For a new project, the shadcn/ui patterns cover most of those parts; the ones listed above you compose yourself.
Pick aparté when you are not on React, or when you want the parts to update as a dependency rather than as copied source. One thing to know: AI Elements’ file tree, terminal and test results are app-fed views, not message types — the same conclusion aparté reached when it removed those segment kinds. A tool result rendered richly — generative UI, in the term the field settled on — is the seam both libraries converge on.
deep-chat
Section titled “deep-chat”The fastest time-to-chat. One <deep-chat> element, configured by attributes and
objects, connects directly to twenty-odd vendor APIs, does files, camera, microphone,
speech in and out, and can run a model in the browser.
Pick deep-chat when you want one tag and a config object and you are done — it is the best of the category at that, and the only other one that runs a model client-side.
Pick aparté when you need composable parts rather than one element (aparté is a viewport, a composer, bubbles and a status line you place yourself), token-level theming, an agent loop with tool approval, or the same chat in four frameworks with typed wrappers. deep-chat’s customisation is a large config surface; aparté’s is CSS and render hooks.
Loquix
Section titled “Loquix”A presentational web-component kit. Fifty-odd Lit components, in Shadow DOM, across reasoning, trust, search and template categories, with accessibility as its headline. By design it ships no provider, no loop and no transport: it is a type-only interface you feed.
Pick Loquix when you already have a chat runtime you like and want a broad, accessible set of views to render its output.
Pick aparté when you want the runtime too. aparté’s core has no third-party dependency (Loquix carries Lit), and its engine runs the agent loop, the tool calls, the approval gate and the conversation compactor — the parts a presentational kit leaves to you. Loquix’s catalogue is about as large as aparté’s, with search and parameter panels aparté does not draw; its roadmap points at provider integrations, which is the ground aparté already covers.
The presentational twin. A set of web components written in SolidJS — a thread, a prompt
input, a conversation list, layouts that compose them — with typed React wrappers, rendering tool
calls, reasoning traces and typed cards (confirmations, choices, forms). It reads an OpenAI or
Anthropic stream your app opened, and ships no HTTP client and no loop: “the kit parses, your app
fetches”. Theming is a token set (--kai-color-*), and its MCP server can brand it from a colour.
Pick kitn when you want a drop-in view over a loop you run elsewhere, and a theme in five minutes.
Pick aparté when the typed cards have to be honoured, not just drawn: aparté’s elicitation pauses the run, collects the answer and resumes it, and the approval step gates a real tool call. kitn draws the same vocabulary without the runtime under it.
OpenAI ChatKit
Section titled “OpenAI ChatKit”The platform drop-in. A web component (with a React wrapper) served by the OpenAI platform through a client token — streaming, tools, attachments, interactive widgets and chain-of-thought visualisation without writing the front end. Self-hosting means running your own chat server with their Python SDK and storing the threads yourself; its guide builds that around OpenAI models and the Agents SDK.
Pick ChatKit when you build on the OpenAI platform and want their hosted chat experience with the least code.
Pick aparté when the model is not OpenAI’s, when the key must stay yours (browser-direct BYOK or your own endpoint), when a model runs locally, or when you need theming beyond what a hosted surface exposes. The lock-in there is the vendor; aparté’s transport is the seam that keeps it out.
Also in the field
Section titled “Also in the field”- CopilotKit — a category above: app-state sync with agents, generative UI, LangGraph co-agents, with chat components of its own in React (CopilotChat, CopilotSidebar, CopilotPopup) and now in Vue and Angular. If that framework is what you need, aparté is not it; aparté can still drive an agent that speaks its AG-UI protocol.
- NLUX — React and vanilla, under the MPL-2.0 licence; no release since August 2024.
- TanStack AI — a type-safe SDK that runs the agent loop on your server, with provider adapters, MCP, durable streams and sandboxes, bindings for React, Preact, Vue, Svelte, Angular and Solid (now at 1.0), and headless chat components you style yourself. Closer to aparté’s engine than to its components — and aparté can draw a TanStack AI route as its UI.
- ai-chat-element — one
<ai-chat>Web Component (0.6.0, MPL-2.0) with a pluggable transport: built-in adapters for OpenAI-compatible and Anthropic APIs, or your own backend. Its README documents Markdown, code, 66 CSS variables and 17 slots, and about 98 KB gzipped; it renders text, and no tool-call or card rendering is documented. - ask-ui-kit — sixteen Lit Web Components (0.4.0, MIT) for AI chat — message, tool call, streaming, chat input, conversation list, model selector — documented alongside ask-rb, a Ruby library. A set of views you feed, like Loquix.
- Persona (
@runtypelabs/persona, 4.34.0, MIT) — a vanilla JavaScript streaming agent widget with a launcher or docked panel, voice input, tool output, approvals and component directives. Its reference setup talks to the Runtype agent platform through an optional proxy package. - Chainlit — Python full-stack; a different stack entirely.
How to read this page
Section titled “How to read this page”aparté is at 1.x (every package released in lockstep, its public surface frozen until 2.0). The comparison is written against that version; the catalogue rows will change as components land, and the runtime rows are the ones that define the project. If a claim above is wrong or out of date, open an issue — a comparison that flatters the author is worth nothing to the reader.