// ══════════════════════════════════════════════════════════════════════ // KERN v2.0.0 — Node Reference (for LLMs) // // Every node type, every prop, every behavior. // Exhaustive. Scan once, generate correctly. // ══════════════════════════════════════════════════════════════════════ // ── PAGE NODES ────────────────────────────────────────────────────── // // page → entry point, compiles to default export component // name: string Component name (default: "Page") // route: string Output path: route="/features" → features/page.tsx // segment: string Dynamic segment: segment="[slug]" → [slug]/page.tsx // client: boolean Adds 'use client' directive // async: boolean Generates async function with params // // layout → wraps child routes with {children} slot // route: string Output path (same as page) // lang: string HTML lang attribute (default: "en") // // loading → loading.tsx with animate-pulse // error → error.tsx with error+reset props, auto client=true // ── METADATA ──────────────────────────────────────────────────────── // // metadata → static Next.js metadata export // title: string // description: string // keywords: string // ogImage: string // // generateMetadata → dynamic metadata function // Children: handler node with code= prop // Example: generateMetadata // handler code="return { title: params.slug };" // ── STRUCTURE ─────────────────────────────────────────────────────── // // row →
with flex (horizontal) // col →
with flex flex-col (vertical) // grid → CSS grid // cols: number grid-cols (responsive: md:grid-cols-N) // gap: number gap in pixels (divided by 4 for Tailwind) // // section →
with optional anchor // id: string HTML id attribute for anchor links // title: string Renders

if present, omitted if absent // // card →
with border support // Styles: border= adds colored border // // list → container with space-y-2 // item → child of list // ── TEXT ──────────────────────────────────────────────────────────── // // text → renders text in any HTML element // value: string Static text content // bind: string Dynamic binding: {variableName} // tag: string HTML element to use // Valid tags: h1 h2 h3 h4 h5 h6 p label span // Default: span // // Examples: // text value="Hello World" tag=h1 {fs:48,fw:800,c:#fff} // text bind=userName tag=p {fs:16,c:#a1a1aa} // ── IMAGE ─────────────────────────────────────────────────────────── // // image → next/image component // src: string Image path or URL // "/path.png" → used as-is // "https://..." → used as-is // "name.svg" → used as-is (has dot) // "name" → becomes /.png (legacy) // alt: string Alt text (default: src value) // width: number Width in pixels // height: number Height in pixels // priority: boolean LCP optimization flag // fill: boolean Fills parent container (omits width/height) // ── CODEBLOCK ─────────────────────────────────────────────────────── // // codeblock →
 with syntax highlighting class
//   lang:   string   Language class (e.g. kern, typescript, bash)
//   value:  string   Inline code content
//   OR use body child node for multiline:
//     codeblock lang=kern
//       body value="line 1  line 2  line 3"

// ── INTERACTIVE ─────────────────────────────────────────────────────
//
// button  →