explaingit

vercel-labs/json-render

Analysis updated 2026-06-24 · repo last pushed 2026-05-20

14,775TypeScriptAudience · developerComplexity · 4/5MaintainedSetup · moderate

TLDR

Generative UI framework where an LLM emits JSON specs constrained to your component catalog, and the framework renders them via your real components.

Mindmap

mindmap
  root((json-render))
    Inputs
      Component catalog
      Zod schemas
      AI JSON spec
    Outputs
      Rendered UI tree
      Streaming progressive render
      Cross-platform views
    Use Cases
      Build AI chat with generative UI
      Constrain LLM to safe components
      Render same spec to React Vue Svelte
      Stream LLM UI specs
    Tech Stack
      TypeScript
      Zod
      React
      Vue
      Svelte
      SolidJS
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build an AI assistant that produces UI restricted to your design system

USE CASE 2

Stream generative UI specs from an LLM and render them progressively

USE CASE 3

Share one JSON UI spec across React, Vue, Svelte, and React Native renderers

USE CASE 4

Add structured generative-UI output to an existing Next.js app

What is it built with?

TypeScriptReactVueSvelteSolidJSZodNext.js

How does it compare?

vercel-labs/json-rendertensorflow/tfjs-modelsglips/figma-context-mcp
Stars14,77514,78314,741
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-05-20
MaintenanceMaintained
Setup difficultymoderateeasyeasy
Complexity4/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Catalog + registry + renderer all need to agree on Zod schemas before any LLM output renders.

In plain English

json-render is a framework from Vercel Labs for what the README calls Generative UI. The idea is to let an AI model produce user interfaces from natural-language prompts, but only by picking from components and actions the developer has defined ahead of time. The AI does not write raw markup. It outputs a JSON spec that has to match a schema, and the framework renders that spec using your real components. The README sets out the trade-off plainly. The model is guardrailed so it can only use components that exist in your catalog. The output is predictable because the JSON must match the schema every time. Specs can stream and render progressively while the model is still responding. The same catalog can drive multiple platforms. Getting started is three steps. First, define a catalog with defineCatalog, declaring components such as Card, Metric, or Button along with Zod schemas for their props and a list of named actions like export_report or refresh_data. Second, define how each component actually renders by calling defineRegistry. Third, pass the AI-generated spec into a Renderer and the framework draws the tree. The project is split across many packages. There is a core package for schemas, catalogs, and stream utilities, plus framework-specific renderers for React, Vue, Svelte 5, SolidJS, and React Native. Other renderers cover Next.js apps with routing and SSR, Remotion video, react-pdf documents, React Email, Ink terminal UIs, Satori-based images, and react-three-fiber 3D scenes. There are also adapters for Redux, Zustand, Jotai, and XState, a devtools panel, an MCP integration, and a YAML wire format. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Define a json-render catalog with Card, Metric, and Button components plus Zod schemas
Prompt 2
Wire json-render Renderer into a Next.js route that streams LLM output
Prompt 3
Add a refresh_data action to the catalog and handle it in defineRegistry
Prompt 4
Share one component catalog between a React web app and a React Native app using json-render

Frequently asked questions

What is json-render?

Generative UI framework where an LLM emits JSON specs constrained to your component catalog, and the framework renders them via your real components.

What language is json-render written in?

Mainly TypeScript. The stack also includes TypeScript, React, Vue.

Is json-render actively maintained?

Maintained — commit in last 6 months (last push 2026-05-20).

How hard is json-render to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is json-render for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.