Skip to content

Best AI Chat UI Libraries in 2026, Compared

A fair, dated comparison of AI chat UI libraries — Loquix, assistant-ui, AI Elements, deep-chat, kitn, ChatKit — on lock-in, runtime, local models and theming.

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 month the weights below were measured; they move fast, so verify before deciding.

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. The other web-component kits 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.
aparté 0.19.2 105 KB 86 KB + 20 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.
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.
assistant-ui 0.15.29 444 KB 377 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: 299 KB + 67 KB React.
CopilotKit 1.79.1 768 KB 682 KB + 18 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 16 October 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 17 October 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 ↗

Criterionapartéassistant-uiAI Elementsdeep-chatLoquixkitn
FrameworksWeb Components + React, Vue, Svelte, Angular wrappersReact (Vue bindings in early preview)ReactWeb Component (+ React wrapper)Web Components (Lit)Web Components (+ React wrappers), built in SolidJS
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)
Weight of a working chat (JavaScript and CSS, gzipped)105 KB444 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—
PersistenceA storage interface you implementA hosted cloud service (paid)Your 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, KaTeX—YesYes———
Voice—Yes (realtime)YesYes——
Citations / sources—PartialYes—Yes—
Floating / modal chat—Yes—Yes (embed)Partial—
Best fit forMulti-framework teams that want the runtime includedReact teams, all-in on ReactApps already on the Vercel AI SDKA config-driven embed, fastA polished presentational kit (Lit)A minimal presentational kit
LicenceMITMITApache-2.0MITMITMIT

The rows read left to right as what aparté is for: the top half is the runtime, the bottom half is the catalogue. aparté wins the top half and loses the bottom half, and both halves are true.

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 a hosted cloud for thread persistence.

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.

The largest catalogue. Fifty-odd 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. Requires React and the Vercel AI SDK.

Pick AI Elements when you build on Next.js and the AI SDK and want a finished part for every screen an agent product has. Nobody else has that breadth.

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 and chain-of-thought visualisation without writing the front end. Self-hosting goes through their Python 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, Vue, Svelte, Angular and Solid, 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.
  • Chainlit — Python full-stack; a different stack entirely.

aparté is in beta (0.x, every package released in lockstep, its public surface frozen). 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.