New advertisers: 50% off your first month with code FIRSTMONTHSee slots

JSON-to-image renderer that converts image specs into SVG or PNG output through Satori.

skills.sh installs
1.6K
GitHub stars
19.8K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers rendering JSON specs into SVG strings via renderToSvg and PNG buffers via renderToPng
  • Includes nine standard components across layout, content, and decorative categories, such as Frame, Row, Column, Heading, and Image
  • Enforces Frame as the required root element, which defines width, height, and background for the image
  • Designed for generating OG images, social cards, and rendering AI-generated image specs; PNG output needs @resvg/resvg-js

Install

$ npx -y skills add vercel-labs/json-render --skill image -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

@json-render/image

Image renderer that converts JSON specs into SVG and PNG images using Satori.

Quick Start

import { renderToPng } from "@json-render/image/render";
import type { Spec } from "@json-render/core";

const spec: Spec = {
  root: "frame",
  elements: {
    frame: {
      type: "Frame",
      props: { width: 1200, height: 630, backgroundColor: "#1a1a2e" },
      children: ["heading"],
    },
    heading: {
      type: "Heading",
      props: { text: "Hello World", level: "h1", color: "#ffffff" },
      children: [],
    },
  },
};

const png = await renderToPng(spec, {
  fonts: [{ name: "Inter", data: fontData, weight: 400, style: "normal" }],
});

Using Standard Components

import { defineCatalog } from "@json-render/core";
import { schema, standardComponentDefinitions } from "@json-render/image";

export const imageCatalog = defineCatalog(schema, {
  components: standardComponentDefinitions,
});

Adding Custom Components

import { z } from "zod";

Details

Repository
github.com/vercel-labs/json-render
Categories
Design & UI/UX, Frontend & UI Code
First seen
May 16, 2026

More from vercel-labs/json-render

All 30

Similar to Image

More Design & UI/UX