OpenUI is a full-stack, framework-agnostic Generative UI framework centered on OpenUI Lang, a compact, streaming-first language that reduces token usage by up to 67% compared to JSON formats. The framework supports React, Vue, Svelte, and Angular via dedicated runtimes, with React offering prebuilt chat interfaces and component libraries. OpenUI Lang enables progressive rendering of model-generated UI as tokens stream, using typed component contracts (Zod schemas) to restrict output to predefined libraries. Benchmark data shows OpenUI Lang achieves 52.8% token savings over Vercel's json-render and 51.7% over Thesys C1 JSON in total across seven UI scenarios (e.g., simple-table: 148 tokens vs 340/357). The ecosystem includes packages like @openuidev/lang-core for framework-agnostic parsing, @openuidev/react-lang for React rendering, and @openuidev/vue-lang/svelte-lang/angular-lang for respective frameworks. A CLI scaffolds apps with `npx @openuidev/cli@latest create`, while the Agent Skill enables AI coding assistants to build/debug OpenUI apps. Key features include library-driven prompt generation, streaming renderers, and multi-platform support (web, mobile, email). The system follows a flowchart: Component Library → System Prompt → LLM → OpenUI Lang Stream → Renderer → Live UI. Full documentation and benchmarks are available at openui.com.
Read original
github-trending/typescript