"use client"; import { Renderer } from "@json-render/react"; import { registry, Provider } from "@/lib/registry"; import { recipes } from "@/lib/recipes"; import { useState, useEffect } from "react"; export default function Home() { const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); if (!mounted) { return (
🥞

Loading recipes...

); } return (

🥞 Les Crêpes de Maîtres

Famous French Chefs' Crêpe Recipes

Powered by json-render

ℹ️ About This Demo

This application demonstrates json-render by Vercel Labs — a library that enables AI-generated UIs with guardrailed components.

Below, each recipe is defined as a JSON specification and rendered through the Renderer component using our type-safe component catalog.

In production, AI would generate these specs from user prompts—safely constrained to only use components we've defined (RecipeHeader, ChefInfo, IngredientList, etc.).

Guardrailed

AI can only use components in your catalog

Predictable

JSON output matches your schema, every time

Fast

Stream and render progressively as the model responds

🔗 github.com/vercel-labs/json-render

{recipes.map((recipe, index) => (
))}
); }