"use client"; import { useEffect, useState } from "react"; // Rotating taglines — Slot 3 above the hero sub (ELF-457, brief ELF-456). // Order matters: index 0 is the default and the initial server-rendered string. const TAGLINES = [ "Inspect any request. Mock any response.", "Your HTTP bin, on your machine.", "Send. Capture. Mock. No signup.", ] as const; // Per-tagline dwell. 3.5s gives ~2.8s solid visibility after the 700ms crossfade. const ROTATE_MS = 3500; export default function Hero() { const [index, setIndex] = useState(0); useEffect(() => { // Respect prefers-reduced-motion at the JS layer too: don't start a timer // for users who opt out. The fade is independently suppressed via the // motion-reduce: variant on the
class below.
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
const id = window.setInterval(() => {
setIndex((i) => (i + 1) % TAGLINES.length);
}, ROTATE_MS);
return () => window.clearInterval(id);
}, []);
return (
{t}
One Go binary. SQLite under the hood.
Self-hostable HTTP request
{/* Slot 3: rotating tagline. Fixed-height container prevents CLS; subtle
opacity crossfade so it doesn't compete with the terminal CTA below.
a11y: aria-live polite + aria-hidden on inactive items. */}
inspector + mocker
docker compose up
, and you have an inspection endpoint and a live feed in under 30 seconds.
${' '}
docker compose up -d{'\n'}
✓ hatch started on :8080{'\n'}
${' '}
curl -X POST https://your-bin.hatch.surf/test -d {'{\'hello\':\'world\'}'}{'\n'}
✓ captured — view at https://your-bin.hatch.surf/inspect