{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "waitlist-inline-pill",
  "type": "registry:component",
  "title": "Waitlist Inline Pill",
  "description": "A minimal dark waitlist with one inline email field over a breathing halo. Invalid input shakes the field, the button shows a spinner while saving, and the form morphs into a success pill with a drawn check.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "waitlist",
    "waitlist",
    "email",
    "inline form",
    "success state",
    "minimal",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/waitlist-inline-pill",
  "files": [
    {
      "path": "registry/hyperblur/waitlist-inline-pill.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/waitlist-inline-pill.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface WaitlistInlinePillValues {\n  email: string;\n}\n\nexport interface WaitlistInlinePillProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onSubmit\"> {\n  badge?: string;\n  title?: string;\n  subtitle?: string;\n  placeholder?: string;\n  ctaLabel?: string;\n  successLabel?: string;\n  note?: string;\n  onSubmit?: (values: WaitlistInlinePillValues) => void | Promise<void>;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-yg5-spin { to { transform: rotate(360deg); } }\n@keyframes hb-yg5-shake {\n  0%, 100% { transform: none; }\n  20% { transform: translateX(-6px); }\n  40% { transform: translateX(5px); }\n  60% { transform: translateX(-3px); }\n  80% { transform: translateX(2px); }\n}\n@keyframes hb-yg5-draw { to { stroke-dashoffset: 0; } }\n@keyframes hb-yg5-pop {\n  0% { opacity: 0; transform: scale(0.9); }\n  60% { opacity: 1; transform: scale(1.03); }\n  100% { opacity: 1; transform: none; }\n}\n@keyframes hb-yg5-breathe {\n  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }\n  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.08); }\n}\n.hb-yg5 {\n  --hb-yg5-accent: #22d3ee;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yg5 *, .hb-yg5 *::before, .hb-yg5 *::after { box-sizing: border-box; }\n.hb-yg5-halo {\n  position: absolute;\n  top: 58%;\n  left: 50%;\n  width: 760px;\n  height: 260px;\n  border-radius: 50%;\n  pointer-events: none;\n  background: radial-gradient(closest-side, color-mix(in srgb, var(--hb-yg5-accent) 22%, transparent), transparent);\n  filter: blur(20px);\n  animation: hb-yg5-breathe 7s ease-in-out infinite;\n}\n.hb-yg5-dots {\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);\n  background-size: 22px 22px;\n  mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);\n  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);\n}\n.hb-yg5-in {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 120px 24px;\n  text-align: center;\n}\n.hb-yg5-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  color: #a1a1a1;\n  font-family: ui-monospace, \"Geist Mono\", Menlo, monospace;\n  font-size: 12px;\n  letter-spacing: 0.06em;\n  text-transform: uppercase;\n}\n.hb-yg5-badge i {\n  width: 6px;\n  height: 6px;\n  border-radius: 50%;\n  background: var(--hb-yg5-accent);\n  box-shadow: 0 0 10px var(--hb-yg5-accent);\n}\n.hb-yg5-title {\n  max-width: 700px;\n  margin: 18px 0 0;\n  font-size: clamp(34px, 5.8cqw, 64px);\n  font-weight: 600;\n  line-height: 1.02;\n  letter-spacing: -0.05em;\n  text-wrap: balance;\n  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.55));\n  -webkit-background-clip: text;\n  background-clip: text;\n  color: transparent;\n}\n.hb-yg5-sub {\n  max-width: 460px;\n  margin: 16px 0 0;\n  color: #8f8f8f;\n  font-size: 16px;\n  line-height: 1.6;\n}\n.hb-yg5-slot {\n  display: flex;\n  justify-content: center;\n  width: 100%;\n  min-height: 60px;\n  margin-top: 36px;\n}\n.hb-yg5-form {\n  display: flex;\n  align-items: center;\n  width: 100%;\n  max-width: 440px;\n  height: 56px;\n  padding: 6px 6px 6px 20px;\n  border: 1px solid rgba(255, 255, 255, 0.1);\n  border-radius: 999px;\n  background: rgba(17, 17, 17, 0.85);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 40px -24px rgba(0, 0, 0, 0.8);\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n  transition: border-color 0.2s ease, box-shadow 0.2s ease;\n}\n.hb-yg5-form:focus-within {\n  border-color: color-mix(in srgb, var(--hb-yg5-accent) 60%, transparent);\n  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-yg5-accent) 16%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.05);\n}\n.hb-yg5-form[data-error=\"true\"] {\n  border-color: rgba(248, 113, 113, 0.7);\n  animation: hb-yg5-shake 0.4s ease;\n}\n.hb-yg5-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n}\n.hb-yg5-input {\n  flex: 1;\n  min-width: 0;\n  height: 100%;\n  border: 0;\n  background: none;\n  color: #ededed;\n  font: inherit;\n  font-size: 15px;\n  outline: none;\n}\n.hb-yg5-input::placeholder { color: #6b6b6b; }\n.hb-yg5-btn {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  height: 100%;\n  min-width: 128px;\n  padding: 0 20px;\n  border: 0;\n  border-radius: 999px;\n  background: var(--hb-yg5-accent);\n  color: #04141a;\n  font: inherit;\n  font-size: 14px;\n  font-weight: 650;\n  cursor: pointer;\n  transition: filter 0.2s ease, transform 0.15s ease;\n}\n.hb-yg5-btn:hover:not(:disabled) { filter: brightness(1.1); }\n.hb-yg5-btn:active:not(:disabled) { transform: scale(0.97); }\n.hb-yg5-btn:disabled { cursor: progress; }\n.hb-yg5-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }\n.hb-yg5-spin {\n  width: 16px;\n  height: 16px;\n  border: 2px solid rgba(4, 20, 26, 0.25);\n  border-top-color: #04141a;\n  border-radius: 50%;\n  animation: hb-yg5-spin 0.7s linear infinite;\n}\n.hb-yg5-error {\n  min-height: 20px;\n  margin: 10px 0 0;\n  color: #f87171;\n  font-size: 13px;\n}\n.hb-yg5-pill {\n  display: inline-flex;\n  align-items: center;\n  gap: 12px;\n  height: 56px;\n  max-width: 100%;\n  padding: 0 22px 0 8px;\n  border: 1px solid color-mix(in srgb, var(--hb-yg5-accent) 45%, transparent);\n  border-radius: 999px;\n  background: color-mix(in srgb, var(--hb-yg5-accent) 10%, #0d0d0d);\n  box-shadow: 0 0 40px -10px color-mix(in srgb, var(--hb-yg5-accent) 50%, transparent);\n  animation: hb-yg5-pop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;\n  outline: none;\n}\n.hb-yg5-check {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 40px;\n  height: 40px;\n  border-radius: 50%;\n  background: var(--hb-yg5-accent);\n  color: #04141a;\n}\n.hb-yg5-check path {\n  stroke-dasharray: 24;\n  stroke-dashoffset: 24;\n  animation: hb-yg5-draw 0.45s 0.25s ease forwards;\n}\n.hb-yg5-pill-text {\n  min-width: 0;\n  overflow: hidden;\n  text-align: left;\n  font-size: 14px;\n  line-height: 1.3;\n}\n.hb-yg5-pill-text strong { display: block; color: #fff; font-weight: 600; }\n.hb-yg5-pill-text span { display: block; overflow: hidden; color: #a1a1a1; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-yg5-note {\n  margin: 8px 0 0;\n  color: #6b6b6b;\n  font-size: 13px;\n}\n@container (max-width: 420px) {\n  .hb-yg5-btn { min-width: 0; padding: 0 16px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yg5-halo, .hb-yg5-form[data-error=\"true\"], .hb-yg5-pill { animation: none; }\n  .hb-yg5-check path { animation: none; stroke-dashoffset: 0; }\n  .hb-yg5-form, .hb-yg5-btn { transition: none; }\n}\n`;\n\nconst emailRe = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;\n\nexport function WaitlistInlinePill({\n  badge = \"Private beta, spring 2026\",\n  title = \"Ship release notes your users actually read\",\n  subtitle = \"Changelog turns merged pull requests into a beautiful product update. Leave your email and we will send an invite.\",\n  placeholder = \"you@company.com\",\n  ctaLabel = \"Join waitlist\",\n  successLabel = \"You are on the list\",\n  note = \"No spam. One email when your invite is ready.\",\n  onSubmit,\n  accent = \"#22d3ee\",\n  className = \"\",\n  style,\n  ...rest\n}: WaitlistInlinePillProps) {\n  const id = React.useId();\n  const [email, setEmail] = React.useState(\"\");\n  const [status, setStatus] = React.useState<\"idle\" | \"loading\" | \"done\">(\"idle\");\n  const [error, setError] = React.useState(\"\");\n  const [shakeKey, setShakeKey] = React.useState(0);\n  const pillRef = React.useRef<HTMLDivElement>(null);\n  const inputRef = React.useRef<HTMLInputElement>(null);\n\n  React.useEffect(() => {\n    if (shakeKey > 0) inputRef.current?.focus();\n  }, [shakeKey]);\n\n  React.useEffect(() => {\n    if (status === \"done\") pillRef.current?.focus();\n  }, [status]);\n\n  const submit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    const value = email.trim();\n    if (!emailRe.test(value)) {\n      setError(value ? \"That email does not look right.\" : \"Enter your email to join.\");\n      setShakeKey((k) => k + 1);\n      return;\n    }\n    setError(\"\");\n    setStatus(\"loading\");\n    try {\n      await Promise.all([onSubmit?.({ email: value }), new Promise((r) => setTimeout(r, 900))]);\n      setStatus(\"done\");\n    } catch {\n      setStatus(\"idle\");\n      setError(\"Something went wrong. Please try again.\");\n    }\n  };\n\n  return (\n    <section className={`hb-yg5 ${className}`} style={{ \"--hb-yg5-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-waitlist-inline-pill\" precedence=\"default\">{css}</style>\n      <div className=\"hb-yg5-dots\" aria-hidden=\"true\" />\n      <div className=\"hb-yg5-halo\" aria-hidden=\"true\" />\n      <div className=\"hb-yg5-in\">\n        <span className=\"hb-yg5-badge\"><i aria-hidden=\"true\" />{badge}</span>\n        <h2 className=\"hb-yg5-title\">{title}</h2>\n        <p className=\"hb-yg5-sub\">{subtitle}</p>\n        <div className=\"hb-yg5-slot\">\n          {status === \"done\" ? (\n            <div ref={pillRef} className=\"hb-yg5-pill\" role=\"status\" tabIndex={-1}>\n              <span className=\"hb-yg5-check\" aria-hidden=\"true\">\n                <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" /></svg>\n              </span>\n              <span className=\"hb-yg5-pill-text\">\n                <strong>{successLabel}</strong>\n                <span>We will write to {email.trim()}</span>\n              </span>\n            </div>\n          ) : (\n            <form\n              key={shakeKey}\n              className=\"hb-yg5-form\"\n              data-error={error ? \"true\" : undefined}\n              onSubmit={submit}\n              noValidate\n            >\n              <label htmlFor={`${id}-email`} className=\"hb-yg5-sr\">Email address</label>\n              <input\n                id={`${id}-email`}\n                className=\"hb-yg5-input\"\n                type=\"email\"\n                inputMode=\"email\"\n                autoComplete=\"email\"\n                placeholder={placeholder}\n                value={email}\n                onChange={(e) => { setEmail(e.target.value); if (error) setError(\"\"); }}\n                aria-invalid={error ? true : undefined}\n                aria-describedby={`${id}-msg`}\n                disabled={status === \"loading\"}\n                ref={inputRef}\n              />\n              <button type=\"submit\" className=\"hb-yg5-btn\" disabled={status === \"loading\"}>\n                {status === \"loading\" ? <><span className=\"hb-yg5-spin\" aria-hidden=\"true\" /><span className=\"hb-yg5-sr\">Joining</span></> : ctaLabel}\n              </button>\n            </form>\n          )}\n        </div>\n        <p id={`${id}-msg`} className=\"hb-yg5-error\" role=\"alert\">{status !== \"done\" ? error : \"\"}</p>\n        {status !== \"done\" && note && <p className=\"hb-yg5-note\">{note}</p>}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}