vercel-labs/json-render
The Generative UI framework
What it solves
json-render is a Generative UI framework that allows AI to create dynamic, personalized user interfaces from natural language prompts. It solves the problem of unpredictability and lack of safety in AI-generated UIs by constraining the AI to a predefined catalog of components and actions, ensuring the output is reliable, predictable, and matches a specific schema.
How it works
The framework operates by separating the UI definition from the implementation:
- Catalog Definition: Developers define a "catalog" using Zod schemas to specify which components (and their required properties) and actions the AI is allowed to use.
- Registry Mapping: Developers create a registry that maps these catalog definitions to actual UI components (e.g., in React, Vue, Svelte, or SolidJS).
- Rendering: The AI generates a JSON specification (spec) based on the catalog. The
Rendererthen takes this JSON spec and the registry to safely render the final UI on the target platform.
Who it’s for
Frontend developers and AI engineers who want to build AI-driven interfaces that can be streamed and rendered progressively across multiple platforms (web, mobile, video, PDF, email, and 3D) without sacrificing design consistency or reliability.
Highlights
- Cross-Platform Support: Works with React, Vue, Svelte, SolidJS, React Native, Remotion (video), React PDF, React Email, and Three.js (3D).
- Guardrailed Output: AI is restricted to a specific component catalog, preventing it from generating invalid or unsupported UI elements.
- Batteries Included: Includes 36 pre-built shadcn/ui components for rapid development.
- Full App Capabilities: Specialized renderers for Next.js and TanStack Start allow JSON specs to become full applications with routes, layouts, and SSR.
- Developer Tooling: Provides a framework-agnostic devtools core with a spec tree, state editor, and DOM picker.
Related
- Project
- Dispatch
- Project
- Project
- Project