Skip to content

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.

On this page

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.

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.

JavaScript and CSS a page downloads to start a chat that streams a reply, gzipped. Each library set up from its own docs' quickstart; the line under each bar says what it holds.
Library At startup
Loquix 0.6.0 27 KB 26 KB + 1 KB CSS Presentational components: the six its Quick Start imports and the token sheet, plus about 50 lines of ours to stream a reply, since it ships no model client; replies are plain text. The full import its README shows: 82 KB + 1 KB CSS.
Deep Chat 2.5.1 120 KB One element with its own clients for 24 AI services (OpenAI, Claude, Gemini, Ollama…), Markdown and tool calls; its styles are inside its JavaScript. The CDN script its docs also list, served as it ships: 105 KB.
aparté 0.32.1 142 KB 119 KB + 22 KB CSS The chat with Markdown while it streams, its own client for any OpenAI-compatible API, and the agent loop with tools and approvals.
assistant-ui 0.15.32 468 KB 401 KB + 67 KB React The AI SDK runtime and the Thread its docs copy into your app: Markdown, tool calls, attachments; the model is called from your server, and its CSS is your Tailwind build’s output. Its LocalRuntime with an adapter you write, in place of the AI SDK: 319 KB + 67 KB React.
CopilotKit 1.83.0 826 KB 740 KB + 19 KB CSS + 67 KB React Its documented React chat: Markdown, math, code highlighting, tool calls and generative UI; its runtime runs on a server and is not counted.

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.

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.

Criterionapartéassistant-uiAI Elementsdeep-chatLoquixkitn
FrameworksWeb Components + React, Vue, Svelte, Angular wrappers — tested with React 19, Vue 3.5, Svelte 4 and 5, Angular 19 and 21React (Vue bindings in early preview)ReactWeb Component (+ React wrapper)Web Components (Lit)Web Components (+ React wrappers), built in SolidJS
Server-rendered page, hydrated with no errorTested in CI with Next 15 App Router, Nuxt 3, SvelteKit 2, Angular 21 SSRnot measurednot measurednot measurednot measurednot measured
Your framework’s components inside tool callsReact, Vue, Svelte 5, Angular — rendered with your app’s contextYes, React (tool UI)Yes, Reactnot measurednot measurednot 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 placeYes, React: a generative UI guide in its docsA Tool component shows a call’s state, input and output; richer widgets are your own Reactnot measurednot measuredTyped cards: confirmations, choices, forms
Runtime included (streaming, agent loop, tool calls)Yes — core + headless engineRuntime adapters (AI SDK, LangGraph, …)Via the Vercel AI SDKBuilt in, config-drivenNo — presentationalNo — 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 workflowYes — runtimes for the AI SDK, AG-UI and others, or a local runtime with an adapter you writeThrough the AI SDK: your route returns a UI message streamYes — a connect property for your own service, besides direct connections to AI APIsYou write the fetch: no model clientYou open the stream (OpenAI or Anthropic format); it renders
Weight of a working chat (JavaScript and CSS, gzipped)142 KB468 KB, React includednot measured: its components are copied into your app120 KB27 KB, no model clientnot measured
Framework you must adoptNone — and no third-party dependency in @aparte/coreReactReact + the AI SDKNoneNone (Lit is bundled)None
Human-in-the-loop: tool approval, typed questionsApproval at the composer, typed elicitation panelGeneric tool UIConfirmation component—Rendered, not runRendered, not run
Edit / retry / branch a conversationYes, with a version pickerYesPartial—Partial—
PersistenceAn IndexedDB adapter in the browser (@aparte/plugin-storage-idb), or a storage interface for your own databaseAssistant Cloud (a free tier, then paid), or threads you persist yourselfYour own———
ThemingCSS variables, light DOM, no forkTailwind / shadcn — fork the markupshadcn — the code lives in your appConfig objectCSS variablesCSS variables (Shadow DOM)
Run a model in the browserYes — the transformers provider——Yes (Web LLM)——
Scripted demo/test providerYes — the scenario provider (deterministic turns: thinking, tools, artifacts)——Demo mode (canned)——
Markdown, code, reasoningYes (opt-in plugins)YesYesYesYesYes
Mermaid, KaTeXYes — maths and diagrams, drawn as they stream, under any Markdown providerYesYes———
Voice—Yes (realtime)YesYes——
Slash commands and @ mentionsYes — any trigger character, submenus, pillsYes———Yes
Citations / sourcesYes — a chip at the end of each cited passage, a card, the source list: OpenAI and OpenRouter annotations, Perplexity, the AI SDKPartialYes—Yes—
Floating / modal chatYes — <aparte-launcher>: a card, a sheet on a phoneYes—Yes (embed)Partial—
Best fit forMulti-framework teams that want the runtime includedReact teams, all-in on ReactApps already built on it; new projects should read its move to shadcn/ui firstA config-driven embed, fastA polished presentational kit (Lit)A minimal presentational kit
LicenceMITMITApache-2.0MITMITMIT

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.

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.

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.

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.

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.

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.

  • 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.

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.