← all repositories
vercel-labs/json-render

AI builds your UI, but only from approved parts

It keeps generative UIs predictable by forcing LLMs to assemble JSON from a developer-approved component catalog instead of writing raw code.

15.7k stars TypeScript App Builders
json-render
Velocity · 7d
+6.1
★ / day
Trend
cooling
star history

What it does

json-render is a framework that sits between an LLM and your frontend. You define a catalog of allowed components and actions—complete with Zod schemas and descriptions—and the AI responds by emitting a flat JSON spec rather than raw code. A framework-specific renderer turns that JSON into actual UI across React, Vue, Svelte, Solid, or React Native. It is essentially a typed assembly kit: the model picks the pieces, but it cannot manufacture new ones.

The interesting bit

The architecture decouples generation from rendering: the same catalog can target web, mobile, terminal, video, PDF, or 3D scenes depending on which renderer package you plug in. The framework also streams and progressively renders the JSON as the model generates it, turning a text stream into a living interface without waiting for the full response. That treats the LLM as a layout engine constrained by your type system.

Key highlights

  • Guardrailed generation: AI can only use components and actions explicitly defined in your catalog with Zod schemas.
  • Cross-platform renderers: One catalog feeds React, Vue, Svelte, Solid, React Native, Next.js, Remotion, React PDF, React Email, Ink, and React Three Fiber.
  • Progressive streaming: The UI renders spec updates as they arrive from the model, not just at the end.
  • Batteries included: Ships with 36 pre-built shadcn/ui component definitions and matching implementations.
  • Ecosystem adapters: Includes devtools, state management bridges (Redux, Zustand, Jotai, XState), MCP server support, and YAML wire formats.

Verdict

Worth a look if you are building AI-native products where reliability matters more than creative freedom, or if you need the same LLM-driven layout to span multiple platforms. Skip it if you want AI to write arbitrary, bespoke components rather than assemble them from a fixed kit.

Frequently asked

What is vercel-labs/json-render?
It keeps generative UIs predictable by forcing LLMs to assemble JSON from a developer-approved component catalog instead of writing raw code.
Is json-render open source?
Yes — vercel-labs/json-render is open source, released under the Apache-2.0 license.
What language is json-render written in?
vercel-labs/json-render is primarily written in TypeScript.
How popular is json-render?
vercel-labs/json-render has 15.7k stars on GitHub and is currently cooling off.
Where can I find json-render?
vercel-labs/json-render is on GitHub at https://github.com/vercel-labs/json-render.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.