json-render (vercel-labs/json-render)

Searching Database…

What is this?json-render is a Generative UI framework: AI generates interfaces from natural language prompts, but output is constrained to a catalog of components you define, so you keep reliability and predictability while letting AI drive the UI.
Is this one rendering library or a whole collection of packages?It is an ecosystem of separate npm packages built around a shared JSON spec: a core schema/catalog package plus dedicated renderers for React, Vue, Svelte, Solid, React Native, Next.js, TanStack Start, Remotion, React PDF, React Email, Ink (terminal), and Three.js, along with devtools and state-store adapters.
How do I get it running in my app?You define a catalog of allowed components with defineCatalog, implement those components for your renderer, then pass AI-generated JSON specs into a provider like JSONUIProvider/Renderer to render them.
Do I have to use shadcn/ui components, or can I bring my own?You are not locked in: @json-render/shadcn ships 36 pre-built shadcn/ui components (Radix UI + Tailwind CSS) ready to use, but you can also define your own component catalog from scratch for any renderer.
Can the AI generate any UI it wants, or is it boxed in?The AI can only emit components that exist in your defined catalog, and the resulting JSON must match your schema every time — this is the core guardrail that keeps output predictable.
Can the same AI-generated spec work across web, mobile, and other targets?Yes, the same catalog and JSON spec can be rendered by different platform-specific renderers: web frameworks (React, Vue, Svelte, Solid), React Native for mobile, and even non-UI targets like PDFs, emails, videos (Remotion), and terminal UIs (Ink).
What do the devtools give me?A drop-in inspector panel (toggled with Ctrl/Cmd+Shift+J) showing the spec tree, state editor, action log, stream log, catalog browser and DOM picker; it tree-shakes to null in production builds.
Can json-render produce things other than web pages, like PDFs or videos?Yes — dedicated renderers exist for React PDF (documents), React Email (emails), Remotion (video), and an Image renderer that outputs SVG/PNG (e.g. OG images).
Does it integrate with AI assistants like Claude or ChatGPT directly?Yes, the @json-render/mcp package provides MCP Apps integration so specs can be rendered inside Claude, ChatGPT, Cursor, and VS Code.
What state management libraries does it work with?Adapters are provided for Redux/Redux Toolkit, Zustand, Jotai, and XState Store, all plugging into the framework's StateStore interface.
Size
8.4 MB
Stars
19.9K
Age
10mo
Commits · 90 Days