Components97 / 118
Peek Login
A sign-in card whose illustration is alive, and watching. The art shifts in real depth parallax, and its creature's eyes follow your cursor, read along as you type your email, squeeze shut while you type your password (one peeks when you show it), go happy when you sign in and dizzy when the details are wrong.
LoginLoginAuthAuthFormFormthree.jsthree.jsDepth parallaxDepth parallaxGSAPGSAP

Lumo
Welcome back
Sign in to pick up where you left off.
New here?
Move around, then type an emailAType a password, then press the eye
Tweak
LIVELIVECopy
Look
#6d5cff
Usage
Follows your tweaks.
usage.tsx
import { PeekLogin } from "@/components/inreact/peek-login";
export function SignIn() {
return (
<PeekLogin
title="Welcome back"
image="/art/login.jpg"
depth="/art/login-depth.png"
onSubmit={async ({ email, password, remember }) => {
const res = await fetch("/api/login", { method: "POST", body: JSON.stringify({ email, password, remember }) });
if (!res.ok) throw new Error("wrong details");
}}
onGoogle={() => (window.location.href = "/api/auth/google")}
/>
);
}Install with the CLI
TS + Tailwind
npx shadcn@latest add https://inreact.vercel.app/r/peek-login.jsonOr copy the source
Install the dependencies, then save this as components/inreact/peek-login.tsx.
terminal
npm install gsap threecomponents/inreact/peek-login.tsx
"use client";
import { gsap } from "gsap";
import * as THREE from "three";
import { useCallback, useEffect, useId, useRef, useState, type FormEvent } from "react";
/**
* Peek Login: a sign-in card whose illustration is alive, and watching.
*
* The picture on the left is a photo with a depth map, drawn in three.js, so
* it shifts in real parallax as you move. Its creature has eyes of its own:
* they follow your cursor and blink now and then, read along the email field
* as you type, squeeze shut while you type your password (and one sneaks a
* peek when you show it), turn into happy arcs when you sign in, and spin
* dizzily when the details are wrong while the form shakes its head.
*
* <PeekLogin onSubmit={async ({ email, password, remember }) => { await signIn(email, password) }} />
*
* Bring your own art: image + depth (white = near) and where the eyes sit.
*/
export interface PeekLoginValues {
email: string;
password: string;
remember: boolean;
}
export interface PeekLoginProps {
/** Throw (or reject) to show the error state. */
onSubmit?: (values: PeekLoginValues) => Promise<void> | void;
onGoogle?: () => void;
onForgot?: () => void;
onSignUp?: () => void;
brand?: string;
title?: string;
subtitle?: string;
image?: string;
/** Depth map for the parallax (white = near). */
depth?: string;
/** Where the creature's eyes sit, as fractions of the art; size is the eye width. */
eyes?: { x: number; y: number; gap: number; size: number };
/** Accent colour (focus lines, checkbox, links). */
accent?: 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,}$/;
const VERT = `varying vec2 vUv; void main(){ vUv = uv; gl_Position = vec4(position.xy, 0.0, 1.0); }`;
const FRAG = `
uniform sampler2D uImg, uDepth;
uniform vec2 uMouse, uScale;
uniform float uTime, uStrength;
varying vec2 vUv;
void main(){
vec2 uv = (vUv - 0.5) * uScale + 0.5; // object-fit: cover
float d = texture2D(uDepth, uv).r;
// a slow breath, plus the cursor: near things move further than far things
vec2 drift = vec2(sin(uTime * 0.6), cos(uTime * 0.45)) * 0.004;
vec2 off = (uMouse * uStrength + drift) * (d - 0.45);
// a few steps along the ray keep edges clean
vec2 p = uv;
for (int i = 0; i < 4; i++) { float dd = texture2D(uDepth, p - off * 0.25 * float(i)).r; p = uv - off * dd * 1.6; }
gl_FragColor = texture2D(uImg, clamp(p, 0.001, 0.999));
}`;
type Mood = "look" | "read" | "shut" | "peek" | "happy" | "dizzy";
export function PeekLogin({
onSubmit = () => new Promise((r) => setTimeout(r, 900)),
onGoogle,
onForgot,
onSignUp,
brand = "Lumo",
title = "Welcome back",
subtitle = "Sign in to pick up where you left off.",
image = "/media/login-art.webp",
depth = "/media/login-art-depth.webp",
eyes = { x: 0.5, y: 0.44, gap: 0.075, size: 0.088 },
accent = "#6d5cff",
className,
}: PeekLoginProps) {
const id = useId();
const cardRef = useRef<HTMLDivElement>(null);
const artRef = useRef<HTMLDivElement>(null);
const eyesRef = useRef<HTMLDivElement>(null);
const formRef = useRef<HTMLFormElement>(null);
const emailRef = useRef<HTMLInputElement>(null);
const passRef = useRef<HTMLInputElement>(null);
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [show, setShow] = useState(false);
const [remember, setRemember] = useState(true);
const [focus, setFocus] = useState<"" | "email" | "password">("");
const [state, setState] = useState<"idle" | "busy" | "ok" | "bad">("idle");
const [error, setError] = useState("");
const look = useRef({ tx: 0, ty: 0, mood: "look" as Mood, depthAtEyes: 0.6 });
const parallax = useRef({ mx: 0, my: 0 });
const mood: Mood = state === "ok" ? "happy" : state === "bad" ? "dizzy" : focus === "password" ? (show ? "peek" : "shut") : focus === "email" ? "read" : "look";
look.current.mood = mood;
/* ---- the picture: photo + depth, in parallax ---- */
useEffect(() => {
const art = artRef.current, card = cardRef.current;
if (!art || !card) 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%;";
art.insertBefore(canvas, art.firstChild);
try {
renderer = new THREE.WebGLRenderer({ canvas, antialias: false, alpha: false });
} catch {
canvas.remove();
return; // the <img> fallback stays visible
}
renderer.outputColorSpace = THREE.SRGBColorSpace;
const scene = new THREE.Scene();
const cam = new THREE.Camera();
const loader = new THREE.TextureLoader();
const U = {
uImg: { value: null as THREE.Texture | null },
uDepth: { value: null as THREE.Texture | null },
uMouse: { value: new THREE.Vector2() },
uScale: { value: new THREE.Vector2(1, 1) },
uTime: { value: 0 },
uStrength: { value: still ? 0 : 0.045 },
};
const mat = new THREE.ShaderMaterial({ uniforms: U, vertexShader: VERT, fragmentShader: FRAG });
const mesh = new THREE.Mesh(new THREE.PlaneGeometry(2, 2), mat);
scene.add(mesh);
let iw = 4, ih = 5, ready = 0;
const fit = () => {
const w = art.clientWidth, h = art.clientHeight;
renderer.setPixelRatio(Math.min(2, window.devicePixelRatio || 1));
renderer.setSize(w, h, false);
const pa = w / h, ta = iw / ih;
U.uScale.value.set(pa > ta ? 1 : pa / ta, pa > ta ? ta / pa : 1);
};
const load = (src: string, cb: (t: THREE.Texture) => void) =>
loader.load(src, (t) => {
t.minFilter = THREE.LinearFilter;
t.generateMipmaps = false;
cb(t);
ready++;
if (ready === 2) art.dataset.ready = "1";
});
load(image, (t) => {
t.colorSpace = THREE.SRGBColorSpace;
U.uImg.value = t;
const im = t.image as HTMLImageElement;
iw = im.width;
ih = im.height;
fit();
});
load(depth, (t) => {
t.colorSpace = THREE.NoColorSpace;
U.uDepth.value = t;
// how near the creature's face is, so the eyes ride the same parallax
try {
const im = t.image as HTMLImageElement, c = document.createElement("canvas");
c.width = c.height = 1;
const g = c.getContext("2d")!;
g.drawImage(im, im.width * eyes.x, im.height * eyes.y, 1, 1, 0, 0, 1, 1);
look.current.depthAtEyes = g.getImageData(0, 0, 1, 1).data[0] / 255;
} catch {}
});
fit();
const ro = new ResizeObserver(fit);
ro.observe(art);
const onMove = (e: PointerEvent) => {
const r = card.getBoundingClientRect();
parallax.current.mx = clamp(-1, 1, ((e.clientX - r.left) / r.width - 0.5) * 2);
parallax.current.my = clamp(-1, 1, ((e.clientY - r.top) / r.height - 0.5) * 2);
};
const onLeave = () => ((parallax.current.mx = 0), (parallax.current.my = 0));
card.addEventListener("pointermove", onMove);
card.addEventListener("pointerleave", onLeave);
let visible = true;
const io = new IntersectionObserver(([en]) => (visible = en.isIntersecting));
io.observe(art);
const m = { x: 0, y: 0 };
const tick = (time: number) => {
if (!visible || ready < 2) return;
// the parallax eases toward the cursor (a soft lag, not a snap)
m.x += (parallax.current.mx - m.x) * 0.08;
m.y += (parallax.current.my - m.y) * 0.08;
U.uMouse.value.set(-m.x, m.y);
U.uTime.value = still ? 0 : time;
renderer.render(scene, cam);
// the eyes ride the parallax of the face beneath them: the shader shows the pixel
// from uv - off * d * 1.6, so the face appears shifted by +off * d * 1.6 (uv, y up)
const eyesEl = eyesRef.current;
if (eyesEl) {
const d = look.current.depthAtEyes;
const tt = still ? 0 : time;
const ox = (-m.x * 0.045 + Math.sin(tt * 0.6) * 0.004) * (d - 0.45) * 1.6 * d;
const oy = (m.y * 0.045 + Math.cos(tt * 0.45) * 0.004) * (d - 0.45) * 1.6 * d;
// (the -50% keeps them centred on their spot; the rest is the parallax)
eyesEl.style.translate = `calc(-50% + ${((ox / U.uScale.value.x) * art.clientWidth).toFixed(2)}px) calc(-50% + ${((-oy / U.uScale.value.y) * art.clientHeight).toFixed(2)}px)`;
}
};
gsap.ticker.add(tick);
return () => {
gsap.ticker.remove(tick);
ro.disconnect();
io.disconnect();
card.removeEventListener("pointermove", onMove);
card.removeEventListener("pointerleave", onLeave);
U.uImg.value?.dispose();
U.uDepth.value?.dispose();
mat.dispose();
mesh.geometry.dispose();
renderer.dispose();
renderer.forceContextLoss();
canvas.remove();
};
}, [image, depth, eyes.x, eyes.y]);
/* ---- the eyes ---- */
// where they look: the cursor, or the end of what you're typing
useEffect(() => {
const card = cardRef.current;
if (!card) return;
const onMove = (e: PointerEvent) => {
if (look.current.mood !== "look") return;
const el = eyesRef.current;
if (!el) return;
const r = el.getBoundingClientRect();
look.current.tx = clamp(-1, 1, (e.clientX - (r.left + r.width / 2)) / 200);
look.current.ty = clamp(-1, 1, (e.clientY - (r.top + r.height / 2)) / 150);
};
const onLeave = () => look.current.mood === "look" && ((look.current.tx = 0), (look.current.ty = 0.1));
card.addEventListener("pointermove", onMove);
card.addEventListener("pointerleave", onLeave);
return () => {
card.removeEventListener("pointermove", onMove);
card.removeEventListener("pointerleave", onLeave);
};
}, []);
const lookAtCaret = useCallback((input: HTMLInputElement | null) => {
const el = eyesRef.current;
if (!input || !el) return;
const c = document.createElement("canvas").getContext("2d")!;
const cs = getComputedStyle(input);
c.font = `${cs.fontWeight} ${cs.fontSize} ${cs.fontFamily}`;
const ir = input.getBoundingClientRect(), er = el.getBoundingClientRect();
const textW = Math.min(c.measureText(input.value).width, ir.width - 12);
const x = ir.left + parseFloat(cs.paddingLeft || "0") + textW, y = ir.top + ir.height / 2;
look.current.tx = clamp(-1, 1, (x - (er.left + er.width / 2)) / 200);
look.current.ty = clamp(-1, 1, (y - (er.top + er.height / 2)) / 150);
}, []);
useEffect(() => {
if (focus === "email") lookAtCaret(emailRef.current);
if (focus === "password" && show) lookAtCaret(passRef.current);
}, [focus, email, password, show, lookAtCaret]);
// the eyes' own little animation loop: pupils on springs, lids, blinks and moods
useEffect(() => {
const root = eyesRef.current;
if (!root) return;
const still = reduced();
const balls = Array.from(root.querySelectorAll<SVGGElement>("[data-ball]"));
const shines = Array.from(root.querySelectorAll<SVGEllipseElement>("[data-shine]"));
const happy = Array.from(root.querySelectorAll<SVGPathElement>("[data-happy]"));
const spins = Array.from(root.querySelectorAll<SVGGElement>("[data-spin]"));
const p = { x: 0, y: 0, vx: 0, vy: 0, open: [1, 1], blink: 1 };
let nextBlink = performance.now() + 2200;
const tick = (time: number, ms: number) => {
const dt = Math.min(ms / 1000, 1 / 30);
const L = look.current;
// pupils: a slightly underdamped spring, so a glance overshoots a touch and settles
for (let k = 0; k < 2; k++) {
p.vx += (220 * (L.tx - p.x) - 20 * p.vx) * (dt / 2);
p.vy += (220 * (L.ty - p.y) - 20 * p.vy) * (dt / 2);
p.x += p.vx * (dt / 2);
p.y += p.vy * (dt / 2);
}
if (still) (p.x = L.tx), (p.y = L.ty);
const want = L.mood === "shut" ? [0.06, 0.06] : L.mood === "peek" ? [0.06, 0.62] : L.mood === "happy" || L.mood === "dizzy" ? [0, 0] : [1, 1];
for (let i = 0; i < 2; i++) p.open[i] += (want[i] - p.open[i]) * (still ? 1 : 1 - Math.exp(-dt * 16));
// blink now and then while looking around
if ((L.mood === "look" || L.mood === "read") && !still && time * 1000 > nextBlink) {
nextBlink = time * 1000 + 2400 + Math.random() * 2600;
gsap.timeline().to(p, { blink: 0.08, duration: 0.07, ease: "power2.in" }).to(p, { blink: 1, duration: 0.22, ease: "back.out(2.5)" });
}
const sp = Math.hypot(p.vx, p.vy);
balls.forEach((b, i) => {
const open = p.open[i] * p.blink;
// a quick glance stretches the pupil along its path (squash and stretch)
const st = Math.min(0.18, sp / 40);
b.setAttribute("transform", `translate(${(p.x * 17).toFixed(2)} ${(p.y * 13).toFixed(2)}) scale(${(1 + st * 0.4).toFixed(3)} ${(Math.max(0.04, open) * (1 - st * 0.3)).toFixed(3)})`);
b.style.opacity = open < 0.02 ? "0" : "1";
shines[i].style.opacity = open < 0.3 ? "0" : "1";
happy[i].style.opacity = L.mood === "happy" ? "1" : "0";
spins[i].style.opacity = L.mood === "dizzy" ? "1" : "0";
if (L.mood === "dizzy" && !still) spins[i].setAttribute("transform", `rotate(${((time * 540 * (i ? -1 : 1)) % 360).toFixed(1)})`);
});
};
gsap.ticker.add(tick);
return () => gsap.ticker.remove(tick);
}, []);
/* ---- the form ---- */
const shakeForm = () => {
if (reduced() || !formRef.current) return;
gsap.fromTo(formRef.current, { x: -12 }, { x: 0, duration: 0.7, ease: "elastic.out(1, 0.22)" });
};
const submit = async (e: FormEvent) => {
e.preventDefault();
if (state === "busy") return;
if (!EMAIL.test(email.trim()) || password.length < 1) {
setError(!EMAIL.test(email.trim()) ? "Enter a valid email address" : "Enter your password");
setState("bad");
shakeForm();
window.setTimeout(() => setState((s) => (s === "bad" ? "idle" : s)), 1300);
return;
}
setError("");
setState("busy");
try {
await onSubmit({ email: email.trim(), password, remember });
setState("ok");
setFocus("");
(document.activeElement as HTMLElement | null)?.blur();
} catch {
setError("Those details don't match");
setState("bad");
shakeForm();
window.setTimeout(() => setState((s) => (s === "bad" ? "idle" : s)), 1300);
}
};
const line = (on: boolean) => (
<span aria-hidden="true" className="absolute right-0 bottom-0 left-0 h-[1.5px] origin-left transition-transform duration-500 ease-[cubic-bezier(0.34,1.56,0.64,1)]" style={{ background: accent, transform: `scaleX(${on ? 1 : 0})` }} />
);
return (
<div
ref={cardRef}
className={["grid grid-cols-1 gap-3 rounded-[28px] bg-white p-3 text-[#16161a] sm:grid-cols-[1.05fr_1fr]", className].filter(Boolean).join(" ")}
style={{ boxShadow: "0 1px 2px rgba(10,10,20,.06), 0 18px 40px -18px rgba(10,10,30,.35)" }}
>
{/* the living picture */}
<div ref={artRef} className="relative aspect-[4/5] overflow-hidden rounded-[20px] bg-[#e9e9ee] sm:aspect-auto sm:min-h-[460px]">
<img src={image} alt="" aria-hidden="true" className="absolute inset-0 size-full object-cover" />
<div
ref={eyesRef}
aria-hidden="true"
className="pointer-events-none absolute flex items-center justify-between"
style={{ left: `${eyes.x * 100}%`, top: `${eyes.y * 100}%`, width: `${(eyes.gap + eyes.size * 2) * 100}%`, translate: "-50% -50%" }}
>
{[0, 1].map((i) => (
<svg key={i} viewBox="-50 -50 100 100" style={{ width: `${(eyes.size / (eyes.gap + eyes.size * 2)) * 100}%`, overflow: "visible" }}>
<g data-ball>
<ellipse rx="34" ry="44" fill="#141218" />
<ellipse data-shine cx="-11" cy="-17" rx="10" ry="12" fill="#fff" />
<circle cx="12" cy="14" r="4.5" fill="#fff" opacity="0.7" />
</g>
<path data-happy d="M-38 12 Q0 -38 38 12" fill="none" stroke="#141218" strokeWidth="13" strokeLinecap="round" style={{ opacity: 0 }} />
<g data-spin style={{ opacity: 0 }}>
<path d="M0 0 m-5 0 a5 5 0 1 1 10 0 a11 11 0 1 1 -22 0 a17 17 0 1 1 34 0 a23 23 0 1 1 -46 0" fill="none" stroke="#141218" strokeWidth="7" strokeLinecap="round" />
</g>
</svg>
))}
</div>
</div>
{/* the form */}
<div className="flex flex-col justify-center px-5 py-6 sm:px-9">
<div className="mx-auto flex items-center gap-2 text-[15px] font-semibold tracking-tight">
<span className="grid size-6 place-items-center rounded-[7px] text-white" style={{ background: "#16161a" }}>
<svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true">
<circle cx="8" cy="8" r="4.5" fill="none" stroke="currentColor" strokeWidth="2.2" />
</svg>
</span>
{brand}
</div>
<h2 className="mt-7 text-center text-[clamp(24px,3vw,32px)] leading-tight font-semibold tracking-[-0.03em]">{title}</h2>
<p className="mt-1.5 text-center text-[13px] text-[#6b6b76]">{subtitle}</p>
<form ref={formRef} onSubmit={submit} noValidate className="mt-7 flex flex-col gap-5">
<label className="block">
<span className="text-[12px] font-medium text-[#6b6b76]">Email</span>
<span className="relative mt-1 block border-b border-[#e3e3ea]">
<input
ref={emailRef}
id={`${id}-email`}
type="email"
autoComplete="email"
value={email}
placeholder="you@studio.com"
onChange={(e) => setEmail(e.target.value)}
onFocus={() => setFocus("email")}
onBlur={() => setFocus((f) => (f === "email" ? "" : f))}
aria-invalid={!!error && !EMAIL.test(email.trim())}
className="w-full border-0 bg-transparent py-2 text-[14px] text-[#16161a] outline-none placeholder:text-[#b3b3bd]"
/>
{line(focus === "email")}
</span>
</label>
<label className="block">
<span className="text-[12px] font-medium text-[#6b6b76]">Password</span>
<span className="relative mt-1 flex items-center border-b border-[#e3e3ea]">
<input
ref={passRef}
id={`${id}-password`}
type={show ? "text" : "password"}
autoComplete="current-password"
value={password}
placeholder="••••••••"
onChange={(e) => setPassword(e.target.value)}
onFocus={() => setFocus("password")}
onBlur={() => setFocus((f) => (f === "password" ? "" : f))}
className="min-w-0 flex-1 border-0 bg-transparent py-2 text-[14px] text-[#16161a] outline-none placeholder:text-[#b3b3bd]"
/>
<button
type="button"
aria-label={show ? "Hide password" : "Show password"}
aria-pressed={show}
onMouseDown={(e) => e.preventDefault()} // keep the field focused
onClick={() => setShow((s) => !s)}
className="grid size-8 cursor-pointer place-items-center rounded-full border-0 bg-transparent text-[#6b6b76] outline-none hover:text-[#16161a] focus-visible:ring-2 focus-visible:ring-black/15"
>
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
<path d="M2.5 12s3.5-6.5 9.5-6.5S21.5 12 21.5 12s-3.5 6.5-9.5 6.5S2.5 12 2.5 12z" />
<circle cx="12" cy="12" r="2.8" />
{!show && <path d="M4 20 20 4" />}
</svg>
</button>
{line(focus === "password")}
</span>
</label>
<div className="flex items-center justify-between text-[12px]">
<label className="flex cursor-pointer items-center gap-2 text-[#4a4a55]">
<input type="checkbox" checked={remember} onChange={(e) => setRemember(e.target.checked)} className="peer sr-only" />
<span
aria-hidden="true"
className="grid size-4 place-items-center rounded-[5px] border transition-colors duration-200 peer-focus-visible:ring-2 peer-focus-visible:ring-black/15"
style={{ background: remember ? accent : "transparent", borderColor: remember ? accent : "#cfcfd8" }}
>
<svg viewBox="0 0 16 16" width="11" height="11" aria-hidden="true">
<path d="M3 8.5l3.2 3L13 4.5" fill="none" stroke="#fff" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" style={{ strokeDasharray: 16, strokeDashoffset: remember ? 0 : 16, transition: "stroke-dashoffset .35s cubic-bezier(.34,1.56,.64,1)" }} />
</svg>
</span>
Remember me
</label>
<button type="button" onClick={onForgot} className="cursor-pointer border-0 bg-transparent p-0 text-[12px] outline-none hover:underline focus-visible:underline" style={{ color: accent }}>
Forgot password?
</button>
</div>
<button
type="submit"
disabled={state === "busy"}
className="mt-1 flex h-12 cursor-pointer items-center justify-center gap-2 rounded-full border-0 text-[14px] font-semibold text-white outline-none transition-[transform,background] duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] hover:-translate-y-0.5 focus-visible:ring-2 focus-visible:ring-black/25 active:translate-y-0 active:scale-[0.97] disabled:cursor-wait"
style={{ background: state === "ok" ? accent : "#16161a" }}
>
{state === "busy" ? "Signing in…" : state === "ok" ? "Welcome back ✓" : "Log in"}
</button>
<button
type="button"
onClick={onGoogle}
className="-mt-2 flex h-12 cursor-pointer items-center justify-center gap-2.5 rounded-full border-0 bg-[#f2f2f5] text-[14px] font-medium text-[#16161a] outline-none transition-colors duration-200 hover:bg-[#e9e9ee] focus-visible:ring-2 focus-visible:ring-black/15"
>
<svg viewBox="0 0 24 24" width="17" height="17" aria-hidden="true">
<path fill="#4285F4" d="M22.6 12.2c0-.8-.1-1.5-.2-2.2H12v4.2h6c-.3 1.4-1 2.5-2.2 3.3v2.7h3.5c2-1.9 3.3-4.6 3.3-8z" />
<path fill="#34A853" d="M12 23c3 0 5.5-1 7.3-2.7l-3.5-2.7c-1 .7-2.3 1.1-3.8 1.1-2.9 0-5.4-2-6.3-4.6H2.1v2.8C3.9 20.5 7.7 23 12 23z" />
<path fill="#FBBC05" d="M5.7 14.1c-.2-.7-.4-1.4-.4-2.1s.1-1.4.4-2.1V7.1H2.1C1.4 8.6 1 10.3 1 12s.4 3.4 1.1 4.9l3.6-2.8z" />
<path fill="#EA4335" d="M12 5.4c1.6 0 3.1.6 4.2 1.7l3.1-3.1C17.5 2.2 15 1 12 1 7.7 1 3.9 3.5 2.1 7.1l3.6 2.8C6.6 7.3 9.1 5.4 12 5.4z" />
</svg>
Continue with Google
</button>
<p aria-live="polite" className="-mt-2 h-4 text-center text-[12px] text-[#d63a52]">
{error}
</p>
</form>
<p className="mt-2 text-center text-[12px] text-[#6b6b76]">
New here?{" "}
<button type="button" onClick={onSignUp} className="cursor-pointer border-0 bg-transparent p-0 text-[12px] font-semibold text-[#16161a] outline-none hover:underline focus-visible:underline">
Create an account
</button>
</p>
</div>
</div>
);
}
export default PeekLogin;
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 propsonSubmit({ email, password, remember }) => Promise<void> | voidSign in; throw or reject to show the error state.onGoogle / onForgot / onSignUp() => voidThe secondary actions.brandstringName beside the mark.default "Lumo"default "Lumo"title / subtitlestringHeading and line under it.imagestringThe illustration.depthstringIts depth map, white = near (drives the parallax).eyes{ x, y, gap, size }Where the creature's eyes sit, as fractions of the art.accentstringFocus lines, checkbox and links.default "#6d5cff"default "#6d5cff"classNamestringExtra classes.