Components96 / 118
Envelope Signup
A newsletter call to action with two real 3D envelopes in its corners, built from a back panel, a folded pocket, a hinged flap and a letter. They lean toward your cursor and peek open at the button; click and the button stretches into an email field as the flaps swing open and the letters rise, jiggling as you type. Subscribe and they seal and hop; a wrong address makes them shake.
NewsletterNewsletterFormFormthree.jsthree.js3D3DSquash & stretchSquash & stretchGSAPGSAP
Notes worth opening, every Friday
One short letter a week with the ideas, tools and work we can't stop thinking about.
Point at the button, then click itTry a wrong address, then a real one
Tweak
LIVELIVECopy
Look
Colours
Usage
Follows your tweaks.
usage.tsx
import { EnvelopeSignup } from "@/components/inreact/envelope-signup";
export function Newsletter() {
return (
<EnvelopeSignup
title="Notes worth *opening*, every Friday"
cta="Join the letter"
onSubscribe={async (email) => {
const res = await fetch("/api/subscribe", { method: "POST", body: JSON.stringify({ email }) });
if (!res.ok) throw new Error("failed");
}}
/>
);
}Install with the CLI
TS + Tailwind
npx shadcn@latest add https://inreact.vercel.app/r/envelope-signup.jsonOr copy the source
Install the dependencies, then save this as components/inreact/envelope-signup.tsx.
terminal
npm install gsap threecomponents/inreact/envelope-signup.tsx
"use client";
import { gsap } from "gsap";
import * as THREE from "three";
import { RoomEnvironment } from "three/addons/environments/RoomEnvironment.js";
import { useEffect, useId, useLayoutEffect, useRef, useState, type FormEvent, type ReactNode } from "react";
/**
* Envelope Signup: a newsletter call to action with two real 3D envelopes.
*
* The envelopes are built like the real thing (a back panel, a folded
* pocket, a hinged flap and a letter inside) and lit in three.js. They bob
* gently and lean toward your cursor. Point at the button and their flaps
* peek open; click it and the button stretches into an email field while
* both flaps swing open and the letters rise out to meet you, jiggling as you
* type. Subscribe and the letters drop back in, the flaps seal and the
* envelopes hop and squash as they land; a mistyped address makes them shake
* their heads.
*
* <EnvelopeSignup title="Notes worth *opening*, every Friday" onSubscribe={(email) => api.subscribe(email)} />
*
* Wrap a word in *asterisks* to set it in the italic serif.
*/
export interface EnvelopeSignupProps {
/** Headline; *word* is set in the italic serif. */
title?: string;
subtitle?: string;
cta?: string;
placeholder?: string;
success?: string;
/** Called with the address; throw (or reject) to show an error. */
onSubscribe?: (email: string) => Promise<void> | void;
/** Card colours, top left to bottom right. */
colors?: [string, string, string];
/** Font of the italic word. */
serifFont?: string;
className?: string;
}
const reduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const clamp = (a: number, b: number, v: number) => Math.max(a, Math.min(b, v));
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
function Title({ text, serif }: { text: string; serif: string }) {
const parts = text.split(/(\*[^*]+\*)/g).filter(Boolean);
return (
<>
{parts.map((p, i) =>
p.startsWith("*") ? (
<em key={i} style={{ fontFamily: serif, fontStyle: "italic", fontWeight: 400, letterSpacing: "-0.01em" }}>
{p.slice(1, -1)}
</em>
) : (
<span key={i}>{p}</span>
),
)}
</>
);
}
/* ---------------- the envelope, built from its real parts ---------------- */
function roundedRect(w: number, h: number, r: number) {
const s = new THREE.Shape();
s.moveTo(-w / 2 + r, -h / 2);
s.lineTo(w / 2 - r, -h / 2);
s.quadraticCurveTo(w / 2, -h / 2, w / 2, -h / 2 + r);
s.lineTo(w / 2, h / 2 - r);
s.quadraticCurveTo(w / 2, h / 2, w / 2 - r, h / 2);
s.lineTo(-w / 2 + r, h / 2);
s.quadraticCurveTo(-w / 2, h / 2, -w / 2, h / 2 - r);
s.lineTo(-w / 2, -h / 2 + r);
s.quadraticCurveTo(-w / 2, -h / 2, -w / 2 + r, -h / 2);
return s;
}
const poly = (pts: [number, number][]) => {
const s = new THREE.Shape();
pts.forEach(([x, y], i) => (i ? s.lineTo(x, y) : s.moveTo(x, y)));
s.closePath();
return s;
};
const slab = (shape: THREE.Shape, depth: number, bevel: number) =>
new THREE.ExtrudeGeometry(shape, { depth, bevelEnabled: true, bevelThickness: bevel, bevelSize: bevel, bevelSegments: 4, curveSegments: 10 });
function letterTexture(accent: string) {
const c = document.createElement("canvas");
c.width = 512;
c.height = 384;
const g = c.getContext("2d")!;
g.fillStyle = "#fbfaf7";
g.fillRect(0, 0, 512, 384);
g.fillStyle = accent;
g.globalAlpha = 0.9;
g.beginPath();
g.roundRect(48, 44, 120, 26, 13);
g.fill();
g.globalAlpha = 1;
g.fillStyle = "#d9d6e2";
[[48, 104, 400], [48, 134, 360], [48, 164, 380], [48, 194, 300], [48, 238, 390], [48, 268, 330]].forEach(([x, y, w]) => {
g.beginPath();
g.roundRect(x, y, w, 10, 5);
g.fill();
});
const t = new THREE.CanvasTexture(c);
t.colorSpace = THREE.SRGBColorSpace;
t.anisotropy = 8;
return t;
}
function makeEnvelope(W: number, H: number, accent: string) {
const paper = (color: string, rough = 0.42) =>
new THREE.MeshPhysicalMaterial({ color, roughness: rough, clearcoat: 0.35, clearcoatRoughness: 0.45, sheen: 0.35, sheenColor: new THREE.Color("#dcd2ff"), sheenRoughness: 0.6 });
const root = new THREE.Group(); // tilt, bob, squash
const body = new THREE.Group();
root.add(body);
const r = Math.min(W, H) * 0.06;
// back panel
const back = new THREE.Mesh(slab(roundedRect(W, H, r), 2, 2.2), paper("#e4ddf0", 0.5));
body.add(back);
// the letter, tucked inside
const letter = new THREE.Group();
const sheet = new THREE.Mesh(new THREE.BoxGeometry(W * 0.84, H * 0.86, 0.8), [
paper("#fbfaf7"),
paper("#fbfaf7"),
paper("#fbfaf7"),
paper("#fbfaf7"),
new THREE.MeshPhysicalMaterial({ map: letterTexture(accent), roughness: 0.55, sheen: 0.2 }),
paper("#fbfaf7"),
]);
sheet.position.z = 4;
letter.add(sheet);
body.add(letter);
// the pocket: side flaps and the bottom flap, folded over each other
const hw = W / 2, hh = H / 2, vy = -hh + H * 0.46;
// side flaps sit a shade darker than the bottom flap, so the folds read in the light
const side = paper("#e9e3f3", 0.5), bottom = paper("#fdfcff", 0.38);
const left = new THREE.Mesh(slab(poly([[-hw, -hh], [-hw * 0.05, vy - H * 0.02], [-hw, hh]]), 1.2, 2), side);
const right = new THREE.Mesh(slab(poly([[hw, -hh], [hw, hh], [hw * 0.05, vy - H * 0.02]]), 1.2, 2), side);
const low = new THREE.Mesh(slab(poly([[-hw, -hh], [hw, -hh], [0, vy + H * 0.02]]), 1.2, 2), bottom);
left.position.z = 7;
right.position.z = 7;
low.position.z = 10.5;
body.add(left, right, low);
// the flap, hinged along the top edge
const hinge = new THREE.Group();
hinge.position.set(0, hh, 13);
const flap = new THREE.Mesh(slab(poly([[-hw, 0], [hw, 0], [0, -H * 0.6]]), 1.2, 2), paper("#f6f3fc", 0.4));
hinge.add(flap);
body.add(hinge);
const sc = document.createElement("canvas");
sc.width = sc.height = 128;
const sg = sc.getContext("2d")!;
const grad = sg.createRadialGradient(64, 64, 4, 64, 64, 62);
grad.addColorStop(0, "rgba(16,4,70,0.55)");
grad.addColorStop(1, "rgba(16,4,70,0)");
sg.fillStyle = grad;
sg.fillRect(0, 0, 128, 128);
const shadowTex = new THREE.CanvasTexture(sc);
const shadow = new THREE.Mesh(new THREE.PlaneGeometry(W * 1.35, H * 1.2), new THREE.MeshBasicMaterial({ map: shadowTex, transparent: true, depthWrite: false }));
shadow.position.set(0, -H * 0.12, -24);
body.add(shadow);
return { root, body, letter, hinge, dispose: () => root.traverse((o) => o instanceof THREE.Mesh && (o.geometry.dispose(), [o.material].flat().forEach((m: THREE.Material & { map?: THREE.Texture | null }) => (m.map?.dispose(), m.dispose())))) };
}
/* ---------------- the component ---------------- */
type Phase = "idle" | "open" | "sending" | "done";
export function EnvelopeSignup({
title = "Notes worth *opening*, every Friday",
subtitle = "One short letter a week with the ideas, tools and work we can't stop thinking about.",
cta = "Join the letter",
placeholder = "you@studio.com",
success = "You're in. See you Friday",
onSubscribe = () => new Promise((r) => setTimeout(r, 900)),
colors = ["#5a6bff", "#4a2dff", "#8a3dff"],
serifFont = 'var(--font-instrument, "Instrument Serif"), Georgia, "Times New Roman", serif',
className,
}: EnvelopeSignupProps) {
const cardRef = useRef<HTMLDivElement>(null);
const glRef = useRef<HTMLDivElement>(null);
const pillRef = useRef<HTMLFormElement>(null);
const inputRef = useRef<HTMLInputElement>(null);
const idleRef = useRef<HTMLButtonElement>(null);
const [phase, setPhase] = useState<Phase>("idle");
const [error, setError] = useState("");
const [email, setEmail] = useState("");
const id = useId();
const shaped = useRef(false); // the first layout sets the pill's width without animating
// what the 3D scene reacts to
const fx = useRef({ peek: () => {}, unpeek: () => {}, open: () => {}, type: () => {}, seal: () => {}, shake: () => {}, close: () => {} });
/* ---- the scene ---- */
useEffect(() => {
const card = cardRef.current, host = glRef.current;
if (!card || !host) return;
const still = reduced();
let renderer: THREE.WebGLRenderer;
const canvas = document.createElement("canvas");
canvas.setAttribute("aria-hidden", "true");
canvas.style.cssText = "position:absolute;inset:0;width:100%;height:100%;pointer-events:none;";
host.appendChild(canvas);
try {
renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
} catch {
canvas.remove();
return;
}
renderer.setClearColor(0x000000, 0);
renderer.toneMapping = THREE.NeutralToneMapping;
renderer.outputColorSpace = THREE.SRGBColorSpace;
const scene = new THREE.Scene();
const pmrem = new THREE.PMREMGenerator(renderer);
const env = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
scene.environment = env;
scene.environmentIntensity = 0.42;
scene.add(new THREE.HemisphereLight(0xffffff, 0x8f80d8, 0.55));
const key = new THREE.DirectionalLight(0xfffaf4, 2.6);
key.position.set(-420, 640, 520);
scene.add(key);
const rim = new THREE.DirectionalLight(0xc9b8ff, 0.7);
rim.position.set(500, -260, 260);
scene.add(rim);
const camera = new THREE.PerspectiveCamera(24, 1, 1, 6000);
let W = 1, H = 1, EW = 1, EH = 1;
const envs = [makeEnvelope(200, 140, colors[1]), makeEnvelope(200, 140, colors[2])];
envs.forEach((e) => scene.add(e.root));
// per envelope state: open amount, letter rise, flap, hop, squash, shake; pointer tilt springs
const S = envs.map(() => ({ flap: 0, rise: 0, hop: 0, sq: 0, shake: 0, jig: 0 }));
const tilt = { x: 0, y: 0, vx: 0, vy: 0, tx: 0, ty: 0 };
let t0 = 0;
const layout = () => {
W = card.clientWidth;
H = card.clientHeight;
renderer.setPixelRatio(Math.min(2, window.devicePixelRatio || 1));
renderer.setSize(W, H, false);
camera.aspect = W / H;
camera.position.set(0, 0, H / 2 / Math.tan(THREE.MathUtils.degToRad(12)));
camera.near = 1;
camera.far = camera.position.z * 3;
camera.lookAt(0, 0, 0);
camera.updateProjectionMatrix();
EW = Math.min(W * 0.21, H * 0.6);
EH = EW * 0.7;
};
layout();
const ro = new ResizeObserver(layout);
ro.observe(card);
const onMove = (e: PointerEvent) => {
const r = card.getBoundingClientRect();
tilt.tx = ((e.clientX - r.left) / r.width - 0.5) * 2;
tilt.ty = ((e.clientY - r.top) / r.height - 0.5) * 2;
};
const onLeave = () => ((tilt.tx = 0), (tilt.ty = 0));
card.addEventListener("pointermove", onMove);
card.addEventListener("pointerleave", onLeave);
const T = (target: object, vars: gsap.TweenVars) => (still ? gsap.set(target, Object.fromEntries(Object.entries(vars).filter(([k]) => !["duration", "ease", "delay", "stagger", "yoyo", "repeat"].includes(k)))) : gsap.to(target, vars));
fx.current = {
// anticipation: the flaps lift a little when you point at the button
peek: () => S.forEach((s, i) => T(s, { flap: Math.max(s.flap, 0.16), duration: 0.5, ease: "back.out(2.5)", delay: i * 0.05, overwrite: "auto" })),
unpeek: () => S.forEach((s) => s.flap < 0.3 && T(s, { flap: 0, duration: 0.5, ease: "back.out(2)", overwrite: "auto" })),
open: () =>
S.forEach((s, i) => {
T(s, { flap: 1, duration: 0.75, ease: "back.out(1.5)", delay: i * 0.08, overwrite: "auto" });
T(s, { rise: 1, duration: 0.8, ease: "back.out(1.6)", delay: 0.25 + i * 0.08 });
}),
type: () => {
if (still) return;
S.forEach((s, i) => gsap.fromTo(s, { jig: 1 }, { jig: 0, duration: 0.45, ease: "elastic.out(1, 0.35)", delay: i * 0.03, overwrite: "auto" }));
},
seal: () =>
S.forEach((s, i) => {
const d = i * 0.08;
if (still) return Object.assign(s, { flap: 0, rise: 0 });
gsap.timeline({ delay: d })
.to(s, { rise: 0, duration: 0.42, ease: "power2.in" })
.to(s, { flap: 0, duration: 0.55, ease: "back.out(1.8)" }, 0.28)
// the hop: crouch, spring up, land with a squash and settle
.to(s, { sq: 1, duration: 0.12, ease: "power2.out" }, 0.7)
.to(s, { sq: -0.8, hop: 1, duration: 0.28, ease: "power2.out" }, 0.82)
.to(s, { hop: 0, sq: 0.9, duration: 0.24, ease: "power2.in" }, 1.1)
.to(s, { sq: 0, duration: 0.7, ease: "elastic.out(1, 0.35)" }, 1.34);
}),
shake: () => {
if (still) return;
S.forEach((s) => gsap.fromTo(s, { shake: 1 }, { shake: 0, duration: 0.9, ease: "elastic.out(1, 0.25)", overwrite: "auto" }));
},
close: () => S.forEach((s, i) => T(s, { flap: 0, rise: 0, duration: 0.55, ease: "back.out(1.6)", delay: i * 0.06, overwrite: "auto" })),
};
let visible = true;
const io = new IntersectionObserver(([en]) => (visible = en.isIntersecting));
io.observe(card);
const tick = (time: number, ms: number) => {
if (!visible) return;
const dt = Math.min(ms / 1000, 1 / 30);
if (!t0) t0 = time;
// pointer tilt on a soft spring
if (still) (tilt.x = tilt.tx), (tilt.y = tilt.ty);
else
for (let k = 0; k < 2; k++) {
tilt.vx += (60 * (tilt.tx - tilt.x) - 11 * tilt.vx) * (dt / 2);
tilt.vy += (60 * (tilt.ty - tilt.y) - 11 * tilt.vy) * (dt / 2);
tilt.x += tilt.vx * (dt / 2);
tilt.y += tilt.vy * (dt / 2);
}
const k = EW / 200; // envelope units to px
envs.forEach((e, i) => {
const s = S[i];
const side = i === 0 ? -1 : 1;
const bob = still ? 0 : Math.sin((time - t0) * 1.3 + i * 1.7) * 0.5 + 0.5;
const sx = 1 + s.sq * 0.08, sy = 1 - s.sq * 0.1;
// sit in the bottom corners, partly below the edge, tilted toward the middle
e.root.position.set(side * (W / 2 - EW * 0.5), -H / 2 + EH * 0.38 + bob * 6 + s.hop * EH * 0.35 + s.rise * EH * 0.12, 0);
e.root.rotation.set(
-0.18 + tilt.y * 0.12 - s.rise * 0.08,
-side * 0.38 + tilt.x * 0.22,
-side * 0.26 + Math.sin(s.shake * 14) * s.shake * 0.12 * side + bob * 0.03 * side,
);
e.root.scale.set(k * sx, k * sy, k);
e.hinge.rotation.x = s.flap * Math.PI * 0.93;
e.letter.position.y = s.rise * 140 * 0.62 + Math.sin(s.jig * 9) * s.jig * 6;
e.letter.rotation.z = Math.sin(s.jig * 7) * s.jig * 0.05 * side;
});
renderer.render(scene, camera);
};
gsap.ticker.add(tick);
return () => {
gsap.ticker.remove(tick);
ro.disconnect();
io.disconnect();
card.removeEventListener("pointermove", onMove);
card.removeEventListener("pointerleave", onLeave);
gsap.killTweensOf(S);
envs.forEach((e) => e.dispose());
env.dispose();
pmrem.dispose();
renderer.dispose();
renderer.forceContextLoss();
canvas.remove();
};
}, [colors.join(",")]); // eslint-disable-line react-hooks/exhaustive-deps
/* ---- the pill: a button that stretches into an email field ---- */
useLayoutEffect(() => {
const pill = pillRef.current;
if (!pill) return;
const still = reduced() || !shaped.current;
shaped.current = true;
const target = phase === "idle" ? (idleRef.current?.scrollWidth ?? 180) : phase === "done" ? Math.min(360, (cardRef.current?.clientWidth ?? 400) * 0.8) : Math.min(380, (cardRef.current?.clientWidth ?? 400) * 0.82);
if (still) return void gsap.set(pill, { width: target });
// squash and stretch as it changes shape
gsap.timeline()
.to(pill, { scaleY: 0.9, scaleX: 1.03, duration: 0.1, ease: "power2.out" })
.to(pill, { width: target, duration: 0.6, ease: "back.out(1.5)" }, 0.05)
.to(pill, { scaleY: 1, scaleX: 1, duration: 0.7, ease: "elastic.out(1, 0.4)" }, 0.12);
if (phase === "open") window.setTimeout(() => inputRef.current?.focus({ preventScroll: true }), 120);
}, [phase]);
const submit = async (e: FormEvent) => {
e.preventDefault();
if (phase !== "open") return;
if (!EMAIL.test(email.trim())) {
setError("That address doesn't look right");
fx.current.shake();
if (!reduced()) gsap.fromTo(pillRef.current, { x: -10 }, { x: 0, duration: 0.6, ease: "elastic.out(1, 0.25)" });
return;
}
setError("");
setPhase("sending");
try {
await onSubscribe(email.trim());
setPhase("done");
fx.current.seal();
} catch {
setPhase("open");
setError("Something went wrong, try again");
fx.current.shake();
}
};
const [a, b, c] = colors;
return (
<div
ref={cardRef}
className={["relative isolate overflow-hidden rounded-[22px] text-center text-white", className].filter(Boolean).join(" ")}
style={{
containerType: "inline-size",
background: `radial-gradient(60% 90% at 14% 8%, rgba(214,206,255,0.85), transparent 60%), radial-gradient(70% 80% at 92% 110%, rgba(30,10,120,0.55), transparent 60%), linear-gradient(118deg, ${a}, ${b} 48%, ${c})`,
}}
>
{/* fine grain, so the colour reads as a surface rather than a flat fill */}
<div
aria-hidden="true"
className="pointer-events-none absolute inset-0 opacity-[0.16] mix-blend-overlay"
style={{ backgroundImage: "url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.9'/></svg>\")" }}
/>
<div ref={glRef} aria-hidden="true" className="pointer-events-none absolute inset-0" />
<div className="relative z-10 mx-auto flex max-w-[34rem] flex-col items-center px-6 pt-[clamp(28px,7%,56px)] pb-[clamp(30px,8%,64px)]">
<h2 className="m-0 text-[clamp(24px,6.4cqw,52px)] leading-[1.04] font-semibold tracking-[-0.035em] text-balance">
<Title text={title} serif={serifFont} />
</h2>
<p className="mx-auto mt-3 max-w-[26rem] text-[clamp(12px,1.9cqw,15px)] leading-relaxed text-white/75">{subtitle}</p>
<form
ref={pillRef}
onSubmit={submit}
noValidate
className="relative mt-6 flex h-12 items-center overflow-hidden rounded-full bg-[#0b0b0d] text-[14px] font-medium"
style={{ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.12), 0 10px 24px -12px rgba(10,0,60,0.55)" }}
>
{phase === "idle" && (
<button
ref={idleRef}
type="button"
onPointerEnter={() => fx.current.peek()}
onPointerLeave={() => fx.current.unpeek()}
onFocus={() => fx.current.peek()}
onBlur={() => fx.current.unpeek()}
onClick={() => {
setPhase("open");
fx.current.open();
}}
className="flex h-full shrink-0 cursor-pointer items-center gap-2 border-0 bg-transparent px-6 whitespace-nowrap text-white outline-none focus-visible:ring-2 focus-visible:ring-white/60"
style={{ font: "inherit" }}
>
{cta}
<svg viewBox="0 0 20 20" width="14" height="14" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d="M5 15 15 5M7 5h8v8" />
</svg>
</button>
)}
{(phase === "open" || phase === "sending") && (
<>
<label htmlFor={`${id}-email`} className="sr-only">
Email address
</label>
<input
ref={inputRef}
id={`${id}-email`}
type="email"
autoComplete="email"
value={email}
placeholder={placeholder}
aria-invalid={!!error}
aria-describedby={`${id}-status`}
disabled={phase === "sending"}
onChange={(e) => {
setEmail(e.target.value);
if (error) setError("");
fx.current.type();
}}
onKeyDown={(e) => {
if (e.key === "Escape") {
setPhase("idle");
setError("");
fx.current.close();
}
}}
className="h-full min-w-0 flex-1 border-0 bg-transparent pr-2 pl-5 text-left text-white outline-none placeholder:text-white/40"
style={{ font: "inherit" }}
/>
<button
type="submit"
disabled={phase === "sending"}
className="mr-1 flex h-10 shrink-0 cursor-pointer items-center gap-1.5 rounded-full border-0 bg-white px-4 text-[#0b0b0d] outline-none focus-visible:ring-2 focus-visible:ring-white/60 disabled:cursor-wait"
style={{ font: "inherit", fontWeight: 600 }}
>
{phase === "sending" ? "Sending" : "Subscribe"}
</button>
</>
)}
{phase === "done" && (
<span className="flex h-full w-full items-center justify-center gap-2 px-6 whitespace-nowrap text-white">
<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">
<path d="M3 8.5l3.2 3L13 4.5" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
</svg>
{success}
</span>
)}
</form>
<p id={`${id}-status`} aria-live="polite" className="mt-2 h-4 text-[12px] text-white/85">
{error}
</p>
</div>
</div>
);
}
export default EnvelopeSignup;
One prompt, any AI agent
Paste into Claude Code, Codex, Cursor or Windsurf. It carries your tweaks and the full source, so the agent installs it exactly.
Props
9 propstitlestringHeadline; wrap a word in *asterisks* for the italic serif.subtitlestringLine under the headline.ctastringButton label.default "Join the letter"default "Join the letter"placeholderstringEmail field placeholder.default "you@studio.com"default "you@studio.com"successstringMessage once subscribed.onSubscribe(email) => Promise<void> | voidCalled with the address; throw or reject to show the error state.colors[string, string, string]Card gradient, top left to bottom right (also tints the letters).default ["#5a6bff", "#4a2dff", "#8a3dff"]default ["#5a6bff", "#4a2dff", "#8a3dff"]serifFontstringFont of the italic word.default "Instrument Serif", Georgiadefault "Instrument Serif", GeorgiaclassNamestringExtra classes.