An AI agent platform landing page template for 2027 that runs your message

How our AI agent platform landing page template works: a workflow drawn as a constellation, a run that lights each step it travels, a customer email the visitor can rewrite, and a rule they own.

7 min read

The real component. Click the picture to open it live and try it before you read how it was built.

Every agent platform says its agents handle real work. This template proves it in the hero: the visitor rewrites a customer's email, sends it, and watches the agent run.

A workflow as a constellation

The workflow is drawn as steps joined by soft S-curves, the way node editors join their steps. A run lights each curve in peach as it reaches the next step; a branch it doesn't take stays faint, labelled with its condition.

src/registry/landing-pages/vesper/chart-canvas.tsx

"use client";

import { useRef, type ReactNode } from "react";
import { motion } from "motion/react";
import { useElementSize } from "@/hooks/use-element-size";
import { EASE_OUT } from "@/lib/motion";
import { cn } from "@/lib/utils";
import { curvePath, toPixels } from "./curve-path";
import { StepIcon } from "./step-icon";
import type { ChartEdge, ChartNode } from "./types";

type NodeState = "waiting" | "done" | "now";

const NODE_STATES: Record<NodeState, string> = {
  waiting: "ring-white/10",
  done: "ring-orange-300/40",
  now: "ring-orange-300 shadow-lg shadow-orange-500/20",
};

interface ChartCanvasProps {
  nodes: ChartNode[];
  edges: ChartEdge[];
  // The steps the run goes through, in order, and how many it has reached.
  path: string[];
  reached: number;
  isAnimated: boolean;
  // A control shown on a step under its name, such as the refund limit on the rules step.
  controls?: Record<string, ReactNode>;
}

function NodeCard({ node, state, control }: { node: ChartNode; state: NodeState; control?: ReactNode }) {
  return (
    <div
      style={{ left: `${node.x}%`, top: `${node.y}%` }}
      className={cn(
        "absolute flex w-36 -translate-x-1/2 -translate-y-1/2 flex-col gap-2 rounded-lg bg-stone-900 p-2 ring-1 transition duration-500",
        NODE_STATES[state],
      )}
    >
      <span className="flex items-center gap-2">
        <StepIcon
          kind={node.kind}
          className={cn("transition-opacity duration-500", state === "waiting" && "opacity-40")}
        />
        <span className="min-w-0">
          <span
            className={cn(
              "block truncate text-xs font-medium transition-colors duration-500",
              state === "waiting" ? "text-stone-400" : "text-stone-100",
            )}
          >
            {node.label}
          </span>
          <span className="block truncate text-2xs text-stone-500">{node.detail}</span>
        </span>
      </span>
      {control}
    </div>
  );
}

// The workflow drawn as a constellation: steps as cards, joined by curves. The run lights each curve it travels
// in peach as it reaches the next step; a branch it doesn't take stays faint, labelled with its condition.
export function ChartCanvas({ nodes, edges, path, reached, isAnimated, controls = {} }: ChartCanvasProps) {
  const ref = useRef<HTMLDivElement>(null);
  const { width, height } = useElementSize(ref);
  const byId = new Map(nodes.map((node) => [node.id, node]));
  const stepOf = (id: string) => path.indexOf(id);
  // The step at which the run travelled this edge, or -1 when it never does.
  const travelledAt = (edge: ChartEdge) => {
    const step = stepOf(edge.to);
    return step > 0 && path[step - 1] === edge.from ? step : -1;
  };
  const stateOf = (id: string): NodeState => {
    const step = stepOf(id);
    if (step < 0 || step >= reached) return "waiting";
    return step === reached - 1 ? "now" : "done";
  };

  return (
    <div ref={ref} className="relative h-full bg-night-dots">
      {width > 0 && (
        <svg aria-hidden viewBox={`0 0 ${width} ${height}`} className="absolute inset-0 size-full">
          {edges.map((edge) => {
            const from = byId.get(edge.from);
            const to = byId.get(edge.to);
            if (!from || !to) return null;
            const line = curvePath(toPixels(from, width, height), toPixels(to, width, height));
            const step = travelledAt(edge);
            return (
              <g key={`${edge.from}-${edge.to}`} fill="none" strokeWidth={1.5}>
                <path d={line} className={edge.condition ? "stroke-white/10" : "stroke-white/20"} />
                {step > 0 && step < reached && (
                  <motion.path
                    d={line}
                    className="stroke-orange-300"
                    initial={isAnimated ? { pathLength: 0 } : false}
                    animate={{ pathLength: 1 }}
                    transition={{ duration: 0.7, ease: EASE_OUT }}
                  />
                )}
              </g>
            );
          })}
        </svg>
      )}
      {edges.map((edge) => {
        const from = byId.get(edge.from);
        const to = byId.get(edge.to);
        if (!edge.condition || !from || !to) return null;
        return (
          <span
            key={`${edge.from}-${edge.to}-label`}
            style={{ left: `${(from.x + to.x) / 2}%`, top: `${(from.y + to.y) / 2}%` }}
            className="absolute -translate-x-1/2 -translate-y-1/2 rounded bg-stone-950 px-1.5 py-0.5 text-2xs text-stone-500 ring-1 ring-white/10"
          >
            {edge.condition}
          </span>
        );
      })}
      {nodes.map((node) => (
        <NodeCard key={node.id} node={node} state={stateOf(node.id)} control={controls[node.id]} />
      ))}
    </div>
  );
}
The workflow canvas

src/registry/landing-pages/vesper/curve-path.ts

interface Point {
  x: number;
  y: number;
}

// The line between two stars on a chart: a soft horizontal S-curve, the way node editors join their steps.
export function curvePath(from: Point, to: Point): string {
  const middle = (from.x + to.x) / 2;
  return `M ${from.x} ${from.y} C ${middle} ${from.y}, ${middle} ${to.y}, ${to.x} ${to.y}`;
}

// A point given in percentages of a box, in that box's pixels.
export function toPixels(point: Point, width: number, height: number): Point {
  return { x: (point.x / 100) * width, y: (point.y / 100) * height };
}

// A smooth line through many points, each joined to the next with the same S-curve.
export function smoothLine(points: Point[]): string {
  return points
    .slice(1)
    .map((point, index) =>
      curvePath(points[index], point).replace(/^M [^C]+/, index === 0 ? `M ${points[0].x} ${points[0].y} ` : ""),
    )
    .join(" ");
}
The S-curve between two steps

The visitor owns the rule

On the rules step, the visitor sets the amount above which refunds wait for a person. Change it and the next run takes the other branch.

src/registry/landing-pages/vesper/limit-stepper.tsx

import { Minus, Plus } from "lucide-react";
import { cn } from "@/lib/utils";
import type { Playground } from "./types";

interface LimitStepperProps {
  limit: Playground["limit"];
  value: number;
  onChange: (value: number) => void;
  className?: string;
}

const STEP_BUTTON =
  "grid size-5 place-items-center rounded text-stone-400 outline-none hover:bg-white/10 hover:text-stone-100 focus-visible:ring-2 focus-visible:ring-orange-300/60 disabled:opacity-30";

// The rule the visitor owns, set on the rules step itself: refunds above this amount wait for a person.
export function LimitStepper({ limit, value, onChange, className }: LimitStepperProps) {
  const step = (direction: number) =>
    onChange(Math.min(Math.max(value + direction * limit.step, limit.min), limit.max));
  return (
    <span
      className={cn(
        "inline-flex items-center gap-1 rounded-md bg-stone-950 p-0.5 text-2xs ring-1 ring-white/10",
        className,
      )}
    >
      <button
        type="button"
        aria-label="Lower the limit"
        disabled={value <= limit.min}
        onClick={() => step(-1)}
        className={STEP_BUTTON}
      >
        <Minus aria-hidden className="size-3" />
      </button>
      <span className="px-1 text-stone-400" aria-live="polite">
        {limit.label} <span className="font-medium text-orange-200 tabular-nums">${value}</span>
      </span>
      <button
        type="button"
        aria-label="Raise the limit"
        disabled={value >= limit.max}
        onClick={() => step(1)}
        className={STEP_BUTTON}
      >
        <Plus aria-hidden className="size-3" />
      </button>
    </span>
  );
}
The rule the visitor owns

More articles