import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Demo } from "@/components/demo"; import { Code } from "@/components/code"; import { CopyButton } from "@/components/copy-button"; export default function Home() { return ( <> {/* Hero */}

JSON becomes UI

Define a catalog. AI generates JSON. Your components render natively.

{/* How it works */}
01

Define Catalog

Specify which components AI can use with Zod schemas. Full type safety and validation.

02

Register Components

Map catalog types to your React components. Use your own design system.

03

Let AI Generate

AI outputs JSON matching your schema. Stream it. Render progressively.

{/* Code example */}

Define your catalog

Components, actions, and validation functions.

{`import { createCatalog } from '@json-render/core'; import { z } from 'zod'; export const catalog = createCatalog({ components: { Card: { props: z.object({ title: z.string(), description: z.string().nullable(), }), hasChildren: true, }, Metric: { props: z.object({ label: z.string(), valuePath: z.string(), format: z.enum(['currency', 'percent']), }), }, }, actions: { export: { params: z.object({ format: z.string() }) }, }, });`}

AI generates JSON

Constrained output that your components render natively.

{`{ "key": "dashboard", "type": "Card", "props": { "title": "Revenue Dashboard", "description": null }, "children": [ { "key": "revenue", "type": "Metric", "props": { "label": "Total Revenue", "valuePath": "/metrics/revenue", "format": "currency" } } ] }`}
{/* Features */}

Features

{[ { title: "Guardrails", desc: "AI can only use components you define in the catalog" }, { title: "Streaming", desc: "Progressive rendering as JSON streams from the model" }, { title: "Data Binding", desc: "Two-way binding with JSON Pointer paths" }, { title: "Actions", desc: "Named actions handled by your application" }, { title: "Visibility", desc: "Conditional show/hide based on data or auth" }, { title: "Validation", desc: "Built-in and custom validation functions" }, ].map((feature) => (

{feature.title}

{feature.desc}

))}
{/* CTA */}

Get started

npm install @json-render/core @json-render/react
); }