
Codegen
vercel-labs/json-renderOfficial
Framework-agnostic utilities that traverse json-render specs and generate code for custom exporters.
- skills.sh installs
- 8.9K
- GitHub stars
- 19.8K
- last updated
- Aug 21, 2026
What it does
- Covers tree traversal, prop serialization, string escaping, and types for building code generators from UI specs
- Includes
traverseSpec,collectUsedComponents,collectStatePaths,collectActions, andserializePropsfor extracting components, state paths, and actions - Provides
SerializeOptionsfor choosing single or double quotes and indentation when emitting code - Designed for developers building custom exporters for Next.js, Remix, or other frameworks
Install
$ npx -y skills add vercel-labs/json-render --skill codegen -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
@json-render/codegen
Framework-agnostic utilities for generating code from json-render UI trees. Use these to build custom code exporters for Next.js, Remix, or other frameworks.
Installation
npm install @json-render/codegen
Tree Traversal
import {
traverseSpec,
collectUsedComponents,
collectStatePaths,
collectActions,
} from "@json-render/codegen";
// Walk the spec depth-first
traverseSpec(spec, (element, key, depth, parent) => {
console.log(`${" ".repeat(depth * 2)}${key}: ${element.type}`);
});
// Get all component types used
const components = collectUsedComponents(spec);
// Set { "Card", "Metric", "Button" }
// Get all state paths referenced
const statePaths = collectStatePaths(spec);
// Set { "analytics/revenue", "user/name" }
// Get all action names
const actions = collectActions(spec);
// Set { "submit_form", "refresh_data" }
Serialization
import {
serializePropValue,
serializeProps,
escapeString,
type SerializeOptions,
} from "@json-render/codegen";
// Serialize a single value
serializePropValue("hello");
// { value: '"hello"', needsBraces: true }
Details
- Repository
- github.com/vercel-labs/json-render
- Categories
- Frontend & UI Code, Skill & Plugin Building
- First seen
- May 16, 2026
More from vercel-labs/json-render
All 30- Next8.6K
- Devtools8.4K
- Directives8.1K
- Mcp5.9K
- React Native3.3K
- Shadcn2.5K
- React Three Fiber2.4K
- React Pdf2.4K
- Zustand1.9K
- Remotion1.8K
- Image1.6K
- Remotion Best Practices1.6K
- Vue1.4K
- React Email1.4K
- Ink1.3K
- Svelte1.3K
- Shadcn Svelte1.2K
- Redux1.2K
- Jotai1.2K
- Xstate1.1K
- Solid1.1K
- Yaml1.1K
- Json Render React391
- Json Render Core340
Similar to Codegen
More Frontend & UI Code
inkSkillvercel-labs/json-render1.3K installsInk terminal renderer that turns JSON specs into interactive terminal UIs with data binding and actions.
json-render-reactSkillvercel-labs/json-render391 installsReact renderer that turns JSON specs into React components, built for AI-generated UI from a component catalog.
json-render-generative-uiSkillreason-machines/trending-skills1.3K installsGenerative UI framework that renders AI-generated JSON specs into type-safe components across many platforms.
knitwork-xSkillhairyf/knitwork-x541 installsUtilities that generate JavaScript and TypeScript source strings for codegen tools, plugins, and dynamic modules.
ui-designerPluginrohitg00/awesome-claude-code-toolkit2.8K starsImplement UI designs from specs with pixel-perfect component generation
unslop — 7-Pillar Design Craft EngineMCP serveravivgerz-hue68 starsAudit UI designs against 72 rules, extract Design DNA, and generate refactor blueprints.