# Chai UI

> Open-source UI component library for building AI apps with model routing, prompt optimization, media analysis and image editing in React, Vue and Svelte.

Chai UI is an open-source (MIT) component library that packages the common interface patterns of AI apps, such as prompt bars, model pickers, result cards and image edit tools, into reusable components for React, Vue and Svelte. The homepage lists version 1.4.15, 148 components and 5 packages, and says the project is in active development.

## What It Is

Chai UI provides controlled components with built-in behavior for AI products. A Composer collects the prompt, media, model and options; an engine runs the request; and a result card shows what comes back. The `useComposer` hook or composable connects the three so the app does not have to write loading, error or streaming state. Engines can call Fal.ai, OpenRouter, Vercel AI Gateway or a custom backend, and API keys stay on the server.

## Built-in intelligence

The docs describe model routing that picks a model or lets users choose, with controls limited to what the selected model supports. Media detection recognizes dropped images, video and audio and adjusts models and options. Prompt optimization rewrites thin prompts with undo, voice-to-prompt transcribes speech into the prompt field, and a world model flow splits a prompt into environment and character. Results can stream, show pass/fail evaluations from a backend or an opt-in judge model, and retry or stop in place.

## Packages and design system

The project is split into `@chai-ui/tokens` (one JSON source built into CSS variables, TypeScript and a Figma token set), `@chai-ui/core` (framework-free request, run and result logic plus engines), and thin React, Vue and Svelte packages. Current styling follows Material Design 3 and can be restyled through tokens.

## Accessibility and agent support

The docs state components are tested against WCAG 2.2 AA with axe in a real browser, with keyboard and focus handling and reduced-motion support, while noting that full conformance depends on the whole page. For coding agents, the project provides `llms.txt`, `DESIGN.md` and a token lint.

## Features
- Composer prompt bar with attach, model picker and submit
- Model routing
- Prompt optimization with undo
- Media detection for images, video and audio
- Voice to prompt
- World model support
- Streaming results
- Pass/fail evaluations
- Retry and stop in place
- Result card and Edit card
- Side panel assistant
- Design tokens for CSS, TypeScript and Figma
- WCAG 2.2 AA tested components
- llms.txt and DESIGN.md for agents

## Integrations
React, Vue, Svelte, Fal.ai, OpenRouter, Vercel AI Gateway, Figma, PNPM

## Platforms
MACOS, WEB, API, DEVELOPER_SDK

## Pricing
Open Source

## Version
1.4.15

## Links
- Website: https://chai-ui.com
- Documentation: https://chai-ui.com/docs
- Repository: https://github.com/kazarazat/chai-ui
- EveryDev.ai: https://www.everydev.ai/tools/chai-ui
