本文へ移動
cccskills
無料GitHub で公開

image

Image renderer for json-render that turns JSON specs into SVG and PNG images via Satori. Use when working with @json-render/image, generating OG images from JSON, creating social cards, or rendering AI-generated image specs.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

@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";

const catalog = defineCatalog(schema, {
  components: {
    ...standardComponentDefinitions,
    Badge: {
      props: z.object({ label: z.string(), color: z.string().nullable() }),
      slots: [],
      description: "A colored badge label",
    },
  },
});

Standard Components

ComponentCategoryDescription
FrameRootRoot container. Defines width, height, background. Must be root.
BoxLayoutContainer with padding, margin, border, absolute positioning
RowLayoutHorizontal flex layout
ColumnLayoutVertical flex layout
HeadingContenth1-h4 heading text
TextContentBody text with full styling
ImageContentImage from URL
DividerDecorativeHorizontal line separator
SpacerDecorativeEmpty vertical space

Key Exports

ExportPurpose
renderToSvgRender spec to SVG string
renderToPngRender spec to PNG buffer (requires @resvg/resvg-js)
schemaImage element schema
standardComponentsPre-built component registry
standardComponentDefinitionsCatalog definitions for AI prompts

Sub-path Exports

ExportDescription
@json-render/imageFull package: schema, components, render functions
@json-render/image/serverSchema and catalog definitions only (no React/Satori)
@json-render/image/catalogStandard component definitions and types
@json-render/image/renderRender functions only

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

codegen

無料

Code generation utilities for json-render. Use when generating code from UI specs, building custom code exporters, traversing specs, or serializing props for @json-render/codegen.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

core

無料

Core package for defining schemas, catalogs, and AI prompt generation for json-render. Use when working with @json-render/core, defining schemas, creating catalogs, or building JSON specs for UI/video generation.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

devtools

無料

Drop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched actions, follow stream patches live, browse a catalog, or pick DOM elements to find their spec keys. Triggers include "add devtools", "debug json-render", "inspect the spec", "why is this element not rendering", "see the state at runtime", or requests to tap streams / capture action logs for `@json-render/devtools`.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

React adapter for the json-render devtools inspector. Use whenever the user wants to add, configure, or troubleshoot @json-render/devtools-react in a React json-render app, including spec inspection, state editing, action and stream timelines, catalog browsing, or DOM picking.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

SolidJS adapter for the json-render devtools inspector. Use whenever the user wants to add, configure, or troubleshoot @json-render/devtools-solid in a SolidJS json-render app, including spec inspection, state editing, action and stream timelines, catalog browsing, or DOM picking.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

Svelte 5 adapter for the json-render devtools inspector. Use whenever the user wants to add, configure, or troubleshoot @json-render/devtools-svelte in a Svelte json-render app, including spec inspection, state editing, action and stream timelines, catalog browsing, or DOM picking.

日本語の概要は準備中です。原文の説明を表示しています。

vercel-labs/json-render1.9万2026年10月8日 更新

vercel-labs のスキルをすべて見る

このスキルの問題を報告する