---
# === IDENTITY ===
id: software/landing-pages/landing-page-code-generation/2026
canonical_question: "How do I generate landing page code — HTML/CSS/JS or React templates by industry, component library?"
aliases:
  - "Build a landing page with Next.js and Tailwind CSS"
  - "Generate a conversion-optimized landing page from a template"
  - "Create a React landing page with shadcn/ui components"
  - "Landing page code generator — no-code vs hand-coded vs AI"
entity_type: execution_recipe
domain: software > landing-pages > landing page code generation
region: global
jurisdiction: global
temporal_scope: 2025-2026

# === VERIFICATION ===
last_verified: 2026-03-11
confidence: 0.87
version: 1.0
first_published: 2026-03-11

# === TEMPORAL VALIDITY ===
temporal_validity:
  status: evolving
  last_breaking_change: "v0 rebranded from v0.dev to v0.app in January 2026; Next.js 15 released with React 19 support; shadcn/ui v2 released with new component primitives"
  next_review: 2026-09-07
  change_sensitivity: high

# === CONSTRAINTS ===
constraints:
  - "Core Web Vitals must pass: LCP < 2.5s, INP < 200ms, CLS < 0.1 — only 48% of mobile pages pass all three as of 2025"
  - "Above-the-fold content drives 73% of conversion decisions — hero section must load in under 3 seconds on mobile"
  - "Single primary CTA per viewport — multiple competing CTAs reduce conversion by 20-30%"
  - "All images must have explicit width/height attributes to prevent CLS; use next/image or srcset for responsive optimization"
  - "A/B testing requires minimum 1,000 visitors per variant for statistical significance at 95% confidence"

# === SKIP CONDITIONS ===
skip_this_unit_if:
  - condition: "User needs a landing page strategy or content plan, not code"
    use_instead: "business/startup-planning/startup-idea-structuring-template/2026"
  - condition: "User needs to optimize an existing landing page for conversions"
    use_instead: "software/landing-pages/ab-testing-infrastructure/2026"
  - condition: "User needs a full marketing website with CMS, blog, and multiple pages"
    use_instead: "Search knowledgelib.io for MVP architecture selection — no dedicated unit yet"

# === AGENT HINTS ===
inputs_needed:
  - key: tool_preference
    question: "Which tool/platform should be used?"
    type: choice
    options: ["Next.js + Tailwind CSS (code)", "HTML/CSS/JS (vanilla)", "Framer (no-code)", "Webflow (no-code)", "AI generation (v0/bolt.new)", "no preference — auto-select"]
  - key: technical_skill
    question: "What is the user's technical skill level?"
    type: choice
    options: ["non-technical (no-code only)", "semi-technical (can edit code)", "developer (can write code)"]
  - key: budget_for_tools
    question: "What's the tool/API budget?"
    type: choice
    options: ["free tier only", "up to $50/month", "up to $200/month", "no limit"]
  - key: industry
    question: "What industry is the landing page for?"
    type: choice
    options: ["SaaS/software", "e-commerce", "agency/services", "startup/pre-launch", "content/media", "other"]

# === EXECUTION METADATA ===
execution:
  required_inputs:
    - name: "Value proposition and headline copy"
      source: "user/brand strategy or agents/startup/brand-messaging"
      format: "text — headline, subheadline, CTA text"
    - name: "Brand assets"
      source: "user/design files or agents/startup/brand-identity"
      format: "logo (SVG), brand colors (hex), typography choice"
    - name: "Page sections and content"
      source: "user/content brief"
      format: "structured list — which sections to include (hero, features, pricing, testimonials, FAQ, CTA)"

  outputs:
    - name: "Deployed landing page"
      format: "deployed URL (Vercel, Netlify, Cloudflare Pages, or platform-hosted)"
      description: "Live, responsive landing page with all sections, optimized images, and passing Core Web Vitals"
    - name: "Source code repository"
      format: "Git repository (GitHub/GitLab)"
      description: "Complete source with component structure, ready for iteration and A/B testing"
    - name: "Performance report"
      format: "Lighthouse JSON or PageSpeed Insights screenshot"
      description: "Core Web Vitals scores confirming LCP < 2.5s, CLS < 0.1, INP < 200ms"

  tools_required:
    - name: "Next.js"
      purpose: "React framework with SSR/SSG, image optimization, and file-based routing"
      tier: free
      cost: "$0 (open source)"
      alternatives: ["Astro", "Vite + React", "plain HTML/CSS"]
    - name: "Tailwind CSS"
      purpose: "Utility-first CSS framework for rapid, consistent styling"
      tier: free
      cost: "$0 (open source)"
      alternatives: ["CSS Modules", "Styled Components", "vanilla CSS"]
    - name: "shadcn/ui"
      purpose: "Accessible, copy-paste React component primitives built on Radix"
      tier: free
      cost: "$0 (open source)"
      alternatives: ["Chakra UI", "MUI", "Headless UI"]
    - name: "Vercel"
      purpose: "Deployment platform with preview URLs and analytics"
      tier: free
      cost: "$0 (hobby) to $20/mo (pro)"
      alternatives: ["Netlify", "Cloudflare Pages", "GitHub Pages"]
    - name: "v0 by Vercel"
      purpose: "AI-powered UI code generation from natural language prompts"
      tier: paid
      cost: "$20/mo (premium) — free tier available with limits"
      alternatives: ["bolt.new", "Lovable", "Meku"]

  credentials_needed:
    - service: "Vercel"
      type: "OAuth (GitHub)"
      where_to_get: "https://vercel.com/signup"
      free_tier_limits: "Unlimited projects, 100 GB bandwidth/month"
    - service: "v0 (optional)"
      type: "Vercel account"
      where_to_get: "https://v0.dev"
      free_tier_limits: "10 generations/day on free plan"

  estimated_duration: "2-6 hours depending on path"
  estimated_cost: "$0 (free tier) to $40/month (paid tools + hosting)"

# === DISTRIBUTION ===
canonical_source: "https://knowledgelib.io/software/landing-pages/landing-page-code-generation/2026"
suggested_citation: "Source: knowledgelib.io — AI Knowledge Library (verified 2026-03-11)"

# === RELATED UNITS ===
related_kos:
  depends_on:
    - id: "business/brand-strategy/brand-messaging-framework/2026"
      label: "Brand messaging and value proposition for headline copy"
  feeds_into:
    - id: "software/landing-pages/ab-testing-infrastructure/2026"
      label: "Landing page A/B testing setup — PostHog feature flags, VWO, custom JS split, minimum sample size for significance"
    - id: "business/startup-marketing/pr-launch-strategy-for-startups/2026"
      label: "Startup launch campaign execution — press outreach, Product Hunt playbook, community seeding, DIY vs agency cost benchmarks"
  alternative_to: []

# === SOURCES ===
sources:
  - id: src1
    title: "20 Best Free Tailwind CSS Landing Page Templates (2026)"
    author: AdminLTE
    url: https://adminlte.io/blog/tailwind-landing-page-templates/
    type: technical_blog
    published: 2026-01-15
    reliability: high
  - id: src2
    title: "Landing Page Best Practices That Convert in 2026"
    author: Lovable
    url: https://lovable.dev/guides/landing-page-best-practices-convert
    type: technical_blog
    published: 2026-01-20
    reliability: high
  - id: src3
    title: "v0 vs Bolt: Hands-On Review of Top AI App Builders in 2026"
    author: Index.dev
    url: https://www.index.dev/blog/v0-vs-bolt-ai-app-builder-review
    type: technical_blog
    published: 2026-02-10
    reliability: high
  - id: src4
    title: "Core Web Vitals: The Complete Guide to LCP, INP & CLS (2026)"
    author: Atlas Marketing
    url: https://atlasmarketing.ai/technical-seo/core-web-vitals-guide/
    type: technical_blog
    published: 2026-01-08
    reliability: high
  - id: src5
    title: "15 High-Converting Landing Page Examples (+ Why They Work)"
    author: Unbounce
    url: https://unbounce.com/landing-page-examples/high-converting-landing-pages/
    type: industry_report
    published: 2025-09-15
    reliability: authoritative
  - id: src6
    title: "Best Next.js Landing Page Layouts for High SaaS Conversions"
    author: Zignuts
    url: https://www.zignuts.com/blog/nextjs-landing-page-layouts
    type: technical_blog
    published: 2025-11-20
    reliability: high
  - id: src7
    title: "Launch UI — Landing Page Components for Next.js + shadcn/ui"
    author: Launch UI
    url: https://github.com/launch-ui/launch-ui
    type: official_docs
    published: 2025-08-01
    reliability: high
  - id: src8
    title: "Framer vs Webflow: Expert Comparison & Verdict (2026)"
    author: Pixeto
    url: https://www.pixeto.co/blog/framer-vs-webflow-which-no-code-builder-wins
    type: technical_blog
    published: 2026-01-25
    reliability: high
---

# Landing Page Code Generation

## Purpose

This recipe produces a fully deployed, conversion-optimized landing page with responsive layout, passing Core Web Vitals, and structured sections (hero, social proof, features, pricing, CTA, FAQ, footer). The output is a live URL plus a source code repository ready for A/B testing and iteration — built using the tool path that matches the user's technical skill level and budget. [src2]

## Prerequisites

- [ ] **Value proposition and headline copy** — clear headline, subheadline, and CTA text (from brand strategy or user-provided)
- [ ] **Brand assets** — logo (SVG preferred), brand colors (hex codes), and font choice
- [ ] **Section content** — text and images for each section: hero, features (3-6 items), social proof (logos or testimonials), pricing (if applicable), FAQ (5-8 items)
- [ ] **Node.js 18+** — installed for code-based paths (PATH A/B skip this)
- [ ] **Git + GitHub account** — for version control and deployment (code paths only)
- [ ] **Deployment account** — Vercel, Netlify, or Cloudflare Pages (free tier sufficient)

## Constraints

- Hero section must communicate the value proposition within 3-5 seconds — above-the-fold real estate drives 73% of conversion decisions. [src5]
- Use a single primary CTA per viewport, repeated strategically: hero, mid-page after social proof, and final section. Multiple competing CTAs reduce conversion. [src2]
- All images require explicit width and height attributes to prevent Cumulative Layout Shift (CLS). Target CLS < 0.1. [src4]
- Largest Contentful Paint (LCP) must be under 2.5 seconds. Only 48% of mobile pages pass this threshold — preload hero images and inline critical CSS. [src4]
- AI-generated code (v0, bolt.new) produces UI scaffolding but requires manual integration of business logic, analytics, and form handling — never deploy raw AI output without review. [src3]

## Tool Selection Decision

```
Which path?
├── User is non-technical AND wants fast launch
│   └── PATH A: No-Code — Framer or Webflow
├── User is non-technical AND wants AI-assisted code ownership
│   └── PATH B: AI Generation — v0 or bolt.new → export to repo
├── User is developer AND wants full control + free stack
│   └── PATH C: Code from Scratch — Next.js + Tailwind + shadcn/ui
└── User is developer AND wants fastest production path
    └── PATH D: Template + Customize — Launch UI or Shipixen starter
```

| Path | Tools | Cost | Speed | Output Quality |
|------|-------|------|-------|---------------|
| A: No-Code | Framer or Webflow | $0-15/mo | 2-4 hours | High design, limited customization |
| B: AI Generation | v0 + Vercel or bolt.new | $0-20/mo | 1-3 hours | Good scaffold, needs refinement |
| C: Code from Scratch | Next.js + Tailwind + shadcn/ui | $0 | 4-8 hours | Full control, highest ceiling |
| D: Template + Customize | Launch UI or starter kit | $0 | 2-4 hours | Production-ready, fast iteration |

## Execution Flow

### Step 1: Project Scaffolding

**Duration**: 5-15 minutes
**Tool**: Terminal (Paths C/D) or browser (Paths A/B)

**Path A (No-Code):** Sign up at framer.com or webflow.com. Select a landing page template in your industry. Skip to Step 3 for content population.

**Path B (AI Generation):** Go to v0.dev (or bolt.new). Enter a detailed prompt describing your page.

**Path C (Code from Scratch):**

```bash
npx create-next-app@latest my-landing-page \
  --typescript --tailwind --eslint --app --src-dir \
  --import-alias "@/*"

cd my-landing-page

# Install shadcn/ui
npx shadcn@latest init -d

# Add commonly needed components
npx shadcn@latest add button card accordion badge separator
```

**Path D (Template Starter):**

```bash
# Option 1: Launch UI (Next.js 15 + shadcn/ui + Tailwind)
git clone https://github.com/launch-ui/launch-ui.git my-landing-page
cd my-landing-page
npm install

# Option 2: Ixartz starter (Next.js 14 + Tailwind + TypeScript)
git clone https://github.com/ixartz/Next-JS-Landing-Page-Starter-Template.git my-landing-page
cd my-landing-page
npm install
```

**Verify**: Run `npm run dev` and confirm the dev server starts at localhost:3000 with no errors.
**If failed**: Check Node.js version (`node -v` must be 18+). Delete `node_modules` and `package-lock.json`, then re-run `npm install`.

### Step 2: Configure Brand Identity

**Duration**: 15-30 minutes
**Tool**: Code editor (Paths C/D) or visual editor (Paths A/B)

Set up global brand tokens — colors, typography, and spacing.

```typescript
// tailwind.config.ts — extend with brand colors
import type { Config } from "tailwindcss";

const config: Config = {
  content: ["./src/**/*.{ts,tsx}"],
  theme: {
    extend: {
      colors: {
        brand: {
          50: "#f0f7ff",
          100: "#e0efff",
          500: "#3b82f6",   // Primary brand color
          600: "#2563eb",   // Primary hover
          700: "#1d4ed8",   // Primary active
          900: "#1e3a5f",   // Dark text
        },
        accent: "#f59e0b",    // CTA accent color
      },
      fontFamily: {
        sans: ["Inter", "system-ui", "sans-serif"],
        heading: ["Cal Sans", "Inter", "sans-serif"],
      },
    },
  },
  plugins: [],
};
export default config;
```

```css
/* src/app/globals.css — critical font loading */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html { @apply scroll-smooth; }
  body { @apply bg-white text-gray-900 antialiased; }
}
```

**Verify**: Brand colors render correctly on the dev server. Text is readable (minimum 4.5:1 contrast ratio).
**If failed**: Check hex values in tailwind.config.ts. Use WebAIM contrast checker to validate accessibility.

### Step 3: Build the Hero Section

**Duration**: 30-60 minutes
**Tool**: Code editor

The hero section is the highest-impact element. It must contain: benefit-driven headline, subheadline with proof point, hero image or product screenshot, single primary CTA, and trust indicators. [src5]

```tsx
// src/components/hero.tsx
import { Button } from "@/components/ui/button";
import Image from "next/image";

export function Hero() {
  return (
    <section className="relative overflow-hidden bg-white pt-24 pb-16 sm:pt-32 sm:pb-24">
      <div className="mx-auto max-w-7xl px-6 lg:px-8">
        <div className="mx-auto max-w-2xl text-center">
          {/* Trust badge */}
          <div className="mb-8 flex justify-center">
            <div className="rounded-full bg-brand-50 px-4 py-1.5 text-sm font-medium text-brand-700 ring-1 ring-brand-500/20">
              Trusted by 2,000+ teams worldwide
            </div>
          </div>

          {/* Headline — benefit-driven, not feature-driven */}
          <h1 className="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl font-heading">
            Ship landing pages
            <span className="text-brand-600"> 10x faster</span>
          </h1>

          {/* Subheadline — proof point */}
          <p className="mt-6 text-lg leading-8 text-gray-600">
            Generate production-ready code from components.
            No design skills required. Passes Core Web Vitals
            out of the box.
          </p>

          {/* CTA cluster */}
          <div className="mt-10 flex items-center justify-center gap-x-6">
            <Button size="lg" className="bg-brand-600 hover:bg-brand-700 text-white px-8 py-3 text-lg">
              Start building free
            </Button>
            <Button variant="ghost" size="lg" className="text-gray-700">
              See examples &rarr;
            </Button>
          </div>

          {/* Social proof logos */}
          <div className="mt-16 flex justify-center gap-8 opacity-60">
            <Image src="/logos/company1.svg" alt="Company 1" width={120} height={40} />
            <Image src="/logos/company2.svg" alt="Company 2" width={120} height={40} />
            <Image src="/logos/company3.svg" alt="Company 3" width={120} height={40} />
          </div>
        </div>
      </div>
    </section>
  );
}
```

**Verify**: Hero renders above the fold on mobile (375px) and desktop (1280px). CTA button is visible without scrolling. LCP element (headline or hero image) loads in under 2.5s.
**If failed**: If LCP is slow, preload the hero image in `layout.tsx` head: `<link rel="preload" as="image" href="/hero.webp" />`. Convert images to WebP format.

### Step 4: Build Conversion Sections

**Duration**: 60-90 minutes
**Tool**: Code editor

Build the remaining sections following the proven conversion layout: social proof, features, pricing, testimonials, FAQ, and final CTA. [src6]

```tsx
// src/components/features.tsx
import { Badge } from "@/components/ui/badge";
import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";

const features = [
  { title: "Component Library", description: "50+ pre-built sections optimized for conversion.", icon: "blocks" },
  { title: "Mobile-First", description: "Responsive from 320px to 4K. No breakpoint bugs.", icon: "smartphone" },
  { title: "Performance", description: "Sub-2s LCP. Passes Core Web Vitals on every deploy.", icon: "zap" },
  { title: "A/B Ready", description: "Built-in variant support. Test headlines, CTAs, layouts.", icon: "split" },
  { title: "Analytics", description: "Event tracking pre-wired. Know what converts.", icon: "bar-chart" },
  { title: "SEO Optimized", description: "Meta tags, OG images, structured data included.", icon: "search" },
];

export function Features() {
  return (
    <section id="features" className="py-24 bg-gray-50">
      <div className="mx-auto max-w-7xl px-6 lg:px-8">
        <div className="mx-auto max-w-2xl text-center mb-16">
          <Badge variant="secondary" className="mb-4">Features</Badge>
          <h2 className="text-3xl font-bold tracking-tight sm:text-4xl">
            Everything you need to convert
          </h2>
        </div>
        <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
          {features.map((feature) => (
            <Card key={feature.title} className="border-0 shadow-sm">
              <CardHeader>
                <CardTitle className="text-lg">{feature.title}</CardTitle>
                <CardDescription>{feature.description}</CardDescription>
              </CardHeader>
            </Card>
          ))}
        </div>
      </div>
    </section>
  );
}
```

```tsx
// src/components/pricing.tsx
import { Button } from "@/components/ui/button";
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card";

const plans = [
  { name: "Starter", price: "Free", features: ["1 landing page", "Basic analytics", "Community support"], cta: "Get started", highlight: false },
  { name: "Pro", price: "$29/mo", features: ["Unlimited pages", "A/B testing", "Priority support", "Custom domain"], cta: "Start free trial", highlight: true },
  { name: "Enterprise", price: "Custom", features: ["Everything in Pro", "SSO", "SLA", "Dedicated CSM"], cta: "Contact sales", highlight: false },
];

export function Pricing() {
  return (
    <section id="pricing" className="py-24">
      <div className="mx-auto max-w-7xl px-6 lg:px-8">
        <div className="mx-auto max-w-2xl text-center mb-16">
          <h2 className="text-3xl font-bold tracking-tight sm:text-4xl">
            Simple, transparent pricing
          </h2>
        </div>
        <div className="grid grid-cols-1 md:grid-cols-3 gap-8 max-w-5xl mx-auto">
          {plans.map((plan) => (
            <Card key={plan.name} className={plan.highlight ? "border-brand-600 border-2 shadow-lg" : "border shadow-sm"}>
              <CardHeader>
                <CardTitle>{plan.name}</CardTitle>
                <CardDescription className="text-3xl font-bold text-gray-900 mt-2">
                  {plan.price}
                </CardDescription>
              </CardHeader>
              <CardContent>
                <ul className="space-y-3 mb-8">
                  {plan.features.map((f) => (
                    <li key={f} className="flex items-center gap-2 text-sm">
                      <span className="text-green-500">&#10003;</span> {f}
                    </li>
                  ))}
                </ul>
                <Button className={plan.highlight ? "w-full bg-brand-600 hover:bg-brand-700" : "w-full"} variant={plan.highlight ? "default" : "outline"}>
                  {plan.cta}
                </Button>
              </CardContent>
            </Card>
          ))}
        </div>
      </div>
    </section>
  );
}
```

```tsx
// src/components/faq.tsx
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion";

const faqs = [
  { q: "How long does setup take?", a: "Most teams ship their first page in under 2 hours." },
  { q: "Can I use my own domain?", a: "Yes. Custom domains are supported on all plans." },
  { q: "Is it mobile responsive?", a: "Every component is mobile-first and tested on real devices." },
  { q: "Do you support A/B testing?", a: "Pro plans include built-in variant support for headlines, CTAs, and layouts." },
  { q: "What about SEO?", a: "Meta tags, OG images, and structured data are included by default." },
];

export function FAQ() {
  return (
    <section id="faq" className="py-24 bg-gray-50">
      <div className="mx-auto max-w-3xl px-6">
        <h2 className="text-3xl font-bold text-center mb-12">Frequently asked questions</h2>
        <Accordion type="single" collapsible>
          {faqs.map((faq, i) => (
            <AccordionItem key={i} value={`item-${i}`}>
              <AccordionTrigger>{faq.q}</AccordionTrigger>
              <AccordionContent>{faq.a}</AccordionContent>
            </AccordionItem>
          ))}
        </Accordion>
      </div>
    </section>
  );
}
```

**Verify**: All sections render in correct order: Hero, Social Proof, Features, Pricing, FAQ, CTA, Footer. No horizontal scroll on mobile. All text is readable.
**If failed**: Check for missing `overflow-hidden` on container elements. Ensure grid columns collapse to single column on mobile (`grid-cols-1`).

### Step 5: Performance Optimization

**Duration**: 30-45 minutes
**Tool**: Code editor + Lighthouse

Optimize for Core Web Vitals before deployment. [src4]

```tsx
// src/app/layout.tsx — critical performance setup
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";

// Next.js font optimization — eliminates FOUT and render-blocking requests
const inter = Inter({
  subsets: ["latin"],
  display: "swap",
  variable: "--font-inter",
});

export const metadata: Metadata = {
  title: "Your Product | Landing Page",
  description: "Benefit-driven meta description under 155 characters for search results.",
  openGraph: {
    title: "Your Product | Landing Page",
    description: "Benefit-driven meta description.",
    url: "https://yourdomain.com",
    siteName: "Your Product",
    images: [{ url: "/og-image.png", width: 1200, height: 630 }],
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "Your Product | Landing Page",
    description: "Benefit-driven meta description.",
    images: ["/og-image.png"],
  },
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" className={inter.variable}>
      <head>
        {/* Preload hero image for LCP optimization */}
        <link rel="preload" as="image" href="/hero.webp" type="image/webp" />
        {/* DNS prefetch for third-party origins */}
        <link rel="dns-prefetch" href="https://fonts.googleapis.com" />
      </head>
      <body className="font-sans antialiased">{children}</body>
    </html>
  );
}
```

```bash
# Image optimization checklist
# Convert all images to WebP (50-80% smaller than JPEG/PNG)
npx sharp-cli --input public/hero.png --output public/hero.webp --format webp --quality 80

# Check bundle size
npx next build
# Verify: First Load JS should be under 100 KB for landing pages
```

**Verify**: Run Lighthouse audit (`npx lighthouse https://localhost:3000 --only-categories=performance`). Target scores: Performance > 90, LCP < 2.5s, CLS < 0.1, INP < 200ms.
**If failed**: If LCP > 2.5s, check hero image size (must be under 200 KB as WebP). If CLS > 0.1, add explicit width/height to all images. If JS bundle > 100 KB, audit imports with `npx next build --analyze`.

### Step 6: Deploy and Verify

**Duration**: 10-20 minutes
**Tool**: Vercel CLI or dashboard

```bash
# Option 1: Vercel (recommended for Next.js)
npm i -g vercel
vercel --prod

# Option 2: Netlify
npm run build
npx netlify deploy --prod --dir=.next

# Option 3: Cloudflare Pages
npm run build
npx wrangler pages deploy .next --project-name=my-landing-page
```

```bash
# Post-deploy verification
# 1. Test Core Web Vitals
npx lighthouse https://yourdomain.com --only-categories=performance --output=json --output-path=./lighthouse-report.json

# 2. Test mobile rendering (Chrome DevTools or real device)
# 3. Test all CTA links point to correct destinations
# 4. Verify OG image renders (use https://opengraph.dev)
# 5. Submit to Google Search Console
```

**Output files**:
- Live URL at your deployment platform (e.g., `https://my-landing-page.vercel.app`)
- Source code in Git repository with all components
- Lighthouse performance report (JSON)

**Verify**: Page loads in under 2 seconds on 4G mobile. All CTA buttons work. OG image renders correctly when shared on social media.
**If failed**: If deploy fails, check `next.config.js` for output mode compatibility with your platform. Vercel auto-detects Next.js; Netlify needs `@netlify/plugin-nextjs`.

## Output Schema

```json
{
  "output_type": "landing_page",
  "format": "deployed URL + git repository",
  "columns": [
    {"name": "url", "type": "string", "description": "Live deployed URL", "required": true},
    {"name": "repository", "type": "string", "description": "Git repository URL with source code", "required": true},
    {"name": "framework", "type": "string", "description": "Framework used (Next.js, Astro, Framer, etc.)", "required": true},
    {"name": "sections", "type": "array", "description": "List of sections included (hero, features, pricing, etc.)", "required": true},
    {"name": "lcp_score", "type": "number", "description": "Largest Contentful Paint in seconds", "required": true},
    {"name": "cls_score", "type": "number", "description": "Cumulative Layout Shift score", "required": true},
    {"name": "lighthouse_score", "type": "number", "description": "Overall Lighthouse performance score", "required": true}
  ],
  "expected_row_count": "1",
  "sort_order": "N/A",
  "deduplication_key": "url"
}
```

## Quality Benchmarks

| Quality Metric | Minimum Acceptable | Good | Excellent |
|---------------|-------------------|------|-----------|
| Lighthouse Performance score | > 70 | > 85 | > 95 |
| LCP (Largest Contentful Paint) | < 4.0s | < 2.5s | < 1.5s |
| CLS (Cumulative Layout Shift) | < 0.25 | < 0.1 | < 0.05 |
| INP (Interaction to Next Paint) | < 500ms | < 200ms | < 100ms |
| Mobile responsiveness | Readable on 375px | No horizontal scroll | Perfect on all breakpoints |
| First Load JS bundle size | < 200 KB | < 100 KB | < 60 KB |
| Image optimization | JPEG/PNG with dimensions | WebP with srcset | AVIF + WebP fallback |

**If below minimum**: Review Step 5 — most performance issues come from unoptimized images (convert to WebP, add width/height), render-blocking CSS (inline critical path), or oversized JS bundles (code-split with dynamic imports).

## Error Handling

| Error | Likely Cause | Recovery Action |
|-------|-------------|----------------|
| `npm create-next-app` fails | Node.js version < 18 | Upgrade Node.js: `nvm install 18 && nvm use 18` |
| shadcn/ui components unstyled | Tailwind not configured for component paths | Add `"./node_modules/@/components/**/*.tsx"` to content array in tailwind.config.ts |
| Images cause CLS on load | Missing width/height attributes | Add explicit `width` and `height` props to all `<Image>` or `<img>` elements |
| LCP > 4s on mobile | Hero image too large or not preloaded | Convert to WebP (< 200 KB), add `<link rel="preload">` in head, use `priority` prop on next/image |
| Vercel deploy fails | Build errors in TypeScript | Run `npx tsc --noEmit` locally to find type errors before deploying |
| v0 generates broken code | Prompt too vague or complex | Break into smaller prompts — generate one section at a time, not the full page |
| Framer/Webflow page slow | Too many animations or unoptimized assets | Disable entrance animations on mobile, compress images, remove unused interactions |
| OG image not rendering | Missing or incorrect meta tags | Verify with https://opengraph.dev — check URL, image dimensions (1200x630), and HTTPS |

## Cost Breakdown

| Component | Free Tier | Paid Tier | At Scale |
|-----------|-----------|-----------|----------|
| Framework (Next.js) | $0 (open source) | N/A | N/A |
| UI library (shadcn/ui) | $0 (open source) | N/A | N/A |
| Hosting (Vercel) | $0 (hobby, 100 GB BW) | $20/mo (pro) | $150+/mo (enterprise) |
| AI generation (v0) | $0 (10 gen/day) | $20/mo (premium) | $50/mo (team) |
| No-code (Framer) | $0 (framer.com domain) | $15/mo (custom domain) | $30/mo (pro) |
| No-code (Webflow) | $0 (webflow.io domain) | $18/mo (custom domain) | $36/mo (CMS) |
| A/B testing | $0 (Vercel Flags or manual) | $49/mo (Unbounce) | $200+/mo (Optimizely) |
| **Total for single page** | **$0** | **$15-40/mo** | **$100-400/mo** |

## Anti-Patterns

### Wrong: Deploying AI-generated code without review
v0 and bolt.new produce visually appealing UI scaffolding, but the generated code often includes unnecessary dependencies, missing accessibility attributes, and placeholder text that looks real. Deploying without review means broken forms, inaccessible elements, and bloated bundles. [src3]

### Correct: Use AI for scaffolding, then manually review
Generate sections one at a time with v0 or bolt.new. Copy the output into your project. Review for: accessibility (aria labels, alt text), performance (unnecessary client-side imports), and correctness (real URLs, working forms). Remove all placeholder content.

### Wrong: Building custom components before checking existing libraries
Developers spend hours building custom accordion, modal, or pricing table components when shadcn/ui, Headless UI, or Radix already provide accessible, tested versions. Custom components introduce accessibility bugs and maintenance burden. [src7]

### Correct: Start with shadcn/ui or equivalent component library
Install shadcn/ui components (`npx shadcn@latest add accordion button card`). Customize with Tailwind classes. Only build custom components when no existing primitive fits your exact interaction pattern.

### Wrong: Optimizing for desktop first
Over 60% of web traffic is mobile. Desktop-first pages break on mobile with horizontal scroll, tiny tap targets, and slow loading over cellular connections. [src4]

### Correct: Mobile-first development
Start with `grid-cols-1` and `px-4`. Add responsive breakpoints up: `sm:grid-cols-2`, `lg:grid-cols-3`. Test on a real mobile device (not just Chrome DevTools) before shipping. Use `min-width` media queries, never `max-width`.

## When This Matters

Use this recipe when an agent needs to produce a working, deployed landing page — not a wireframe, mockup, or content strategy document. It requires a clear value proposition (headline copy) and brand assets as inputs. The output is a live URL with source code, ready for A/B testing and conversion optimization.

## Related Units

- [Landing Page Copywriting Framework](/software/landing-pages/landing-page-copywriting-framework/2026) — conversion copy structure for headlines and CTAs
- [Landing Page A/B Testing Setup](/software/landing-pages/landing-page-ab-testing-setup/2026) — set up variant testing after initial deploy
- [MVP Technical Architecture Selection](/software/mvp-development/mvp-technical-architecture-selection/2026) — when the page grows beyond a single landing page
- [Startup Launch Sequence](/business/startup-marketing/startup-launch-sequence/2026) — launch campaign using the landing page
- [Brand Messaging Framework](/business/brand-strategy/brand-messaging-framework/2026) — develop the value proposition that drives hero copy