{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "how-stepper-screens",
  "type": "registry:component",
  "title": "Stepper With Screens",
  "description": "A how it works section with a vertical stepper beside a mock app window. Each step swaps the screen with a blur and slide, and the steps advance on their own with a progress bar.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "how-it-works",
    "how it works",
    "stepper",
    "tabs",
    "product tour",
    "autoplay",
    "screens"
  ],
  "docs": "https://hyperblur.dev/effects/how-stepper-screens",
  "files": [
    {
      "path": "registry/hyperblur/how-stepper-screens.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/how-stepper-screens.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HowStepperStep {\n  title: string;\n  description: string;\n}\n\nexport interface HowStepperScreensProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onChange\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  steps?: HowStepperStep[];\n  step?: number;\n  defaultStep?: number;\n  onStepChange?: (index: number) => void;\n  autoplay?: boolean;\n  interval?: number;\n  accent?: string;\n}\n\nconst defaultSteps: HowStepperStep[] = [\n  { title: \"Connect your repository\", description: \"Pick a GitHub or GitLab repo. We read the framework and set build settings for you.\" },\n  { title: \"Choose a starting point\", description: \"Start from a template or keep your own setup. Environment variables import from your .env file.\" },\n  { title: \"Invite your team\", description: \"Add reviewers by email. Everyone gets a preview link on every pull request.\" },\n  { title: \"Ship to production\", description: \"Merge to main and the build goes live on the edge in about forty seconds.\" },\n];\n\nconst css = `\n.hb-yj5 {\n  --hb-yj5-accent: #22d3ee;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  isolation: isolate;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-yj5 *, .hb-yj5 *::before, .hb-yj5 *::after { box-sizing: border-box; }\n.hb-yj5::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background:\n    radial-gradient(45% 55% at 75% 55%, color-mix(in srgb, var(--hb-yj5-accent) 10%, transparent), transparent 70%),\n    radial-gradient(30% 30% at 10% 10%, rgba(255, 255, 255, .04), transparent 70%);\n  pointer-events: none;\n}\n.hb-yj5-inner { max-width: 1120px; margin: 0 auto; padding: 72px 20px; }\n@container (min-width: 820px) { .hb-yj5-inner { padding: 100px 32px; } }\n.hb-yj5-head { max-width: 640px; margin-bottom: 44px; }\n.hb-yj5-eyebrow {\n  margin: 0 0 14px;\n  color: var(--hb-yj5-accent);\n  font: 500 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n  letter-spacing: .14em;\n  text-transform: uppercase;\n}\n.hb-yj5-title { margin: 0; font-size: clamp(30px, 4.6cqw, 46px); line-height: 1.06; letter-spacing: -.03em; font-weight: 650; text-wrap: balance; }\n.hb-yj5-sub { margin: 14px 0 0; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-yj5-body { display: grid; gap: 28px; }\n@container (min-width: 820px) { .hb-yj5-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; } }\n.hb-yj5-list { display: grid; gap: 6px; }\n.hb-yj5-step {\n  position: relative;\n  display: grid;\n  grid-template-columns: 34px minmax(0, 1fr);\n  gap: 14px;\n  width: 100%;\n  padding: 16px;\n  border: 1px solid transparent;\n  border-radius: 16px;\n  background: none;\n  color: inherit;\n  font: inherit;\n  text-align: left;\n  cursor: pointer;\n  transition: background .3s ease, border-color .3s ease;\n}\n.hb-yj5-step:hover { background: rgba(255, 255, 255, .03); }\n.hb-yj5-step:focus-visible { outline: 2px solid var(--hb-yj5-accent); outline-offset: 2px; }\n.hb-yj5-step[aria-selected=\"true\"] {\n  border-color: rgba(255, 255, 255, .08);\n  background: linear-gradient(180deg, #141414, #101010);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);\n}\n.hb-yj5-num {\n  display: grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 10px;\n  color: #8f8f8f;\n  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;\n  transition: all .3s ease;\n}\n.hb-yj5-step[aria-selected=\"true\"] .hb-yj5-num { border-color: var(--hb-yj5-accent); background: color-mix(in srgb, var(--hb-yj5-accent) 14%, transparent); color: var(--hb-yj5-accent); }\n.hb-yj5-done .hb-yj5-num { color: #ededed; }\n.hb-yj5-step-title { display: block; padding-top: 7px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: #a1a1a1; transition: color .3s ease; }\n.hb-yj5-step[aria-selected=\"true\"] .hb-yj5-step-title { color: #ededed; }\n.hb-yj5-desc {\n  display: grid;\n  grid-template-rows: 0fr;\n  transition: grid-template-rows .4s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-yj5-step[aria-selected=\"true\"] .hb-yj5-desc { grid-template-rows: 1fr; }\n.hb-yj5-desc > span { overflow: hidden; color: #8f8f8f; font-size: 14px; line-height: 1.55; }\n.hb-yj5-desc > span > span { display: block; padding-top: 6px; }\n.hb-yj5-prog {\n  position: absolute;\n  left: 16px;\n  right: 16px;\n  bottom: 0;\n  height: 2px;\n  border-radius: 2px;\n  background: rgba(255, 255, 255, .06);\n  overflow: hidden;\n  opacity: 0;\n}\n.hb-yj5-step[aria-selected=\"true\"] .hb-yj5-prog { opacity: 1; }\n.hb-yj5-prog i {\n  display: block;\n  height: 100%;\n  background: var(--hb-yj5-accent);\n  transform-origin: left;\n  transform: scaleX(0);\n}\n.hb-yj5-run .hb-yj5-step[aria-selected=\"true\"] .hb-yj5-prog i { animation: hb-yj5-fill var(--hb-yj5-dur, 5s) linear forwards; }\n.hb-yj5-paused .hb-yj5-prog i { animation-play-state: paused !important; }\n.hb-yj5-window {\n  position: relative;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 20px;\n  background: linear-gradient(180deg, #131313, #0c0c0c);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 6px rgba(255, 255, 255, .02);\n  overflow: hidden;\n}\n.hb-yj5-chrome {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 12px 14px;\n  border-bottom: 1px solid rgba(255, 255, 255, .06);\n}\n.hb-yj5-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #262626; }\n.hb-yj5-url {\n  flex: 1;\n  max-width: 300px;\n  margin: 0 auto;\n  padding: 5px 12px;\n  border-radius: 8px;\n  background: rgba(255, 255, 255, .04);\n  color: #8f8f8f;\n  font: 500 11.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;\n  text-align: center;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.hb-yj5-stage { position: relative; min-height: 372px; }\n@container (max-width: 560px) { .hb-yj5-row .hb-yj5-meta { display: none; } .hb-yj5-thumb { height: 54px; } }\n.hb-yj5-screen {\n  position: absolute;\n  inset: 0;\n  padding: 22px;\n  opacity: 0;\n  transform: translateY(14px) scale(.985);\n  filter: blur(6px);\n  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1), filter .45s ease;\n  pointer-events: none;\n}\n.hb-yj5-screen[data-on=\"true\"] { opacity: 1; transform: none; filter: none; pointer-events: auto; }\n.hb-yj5-label { margin: 0 0 14px; color: #8f8f8f; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }\n.hb-yj5-row {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 12px 14px;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background: rgba(255, 255, 255, .02);\n  font-size: 14px;\n}\n.hb-yj5-row + .hb-yj5-row { margin-top: 8px; }\n.hb-yj5-ico {\n  flex: none;\n  display: grid;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  border-radius: 8px;\n  background: #1c1c1c;\n  color: #a1a1a1;\n}\n.hb-yj5-meta { margin-left: auto; color: #6b6b6b; font-size: 12px; white-space: nowrap; }\n.hb-yj5-pill {\n  margin-left: auto;\n  padding: 6px 12px;\n  border-radius: 999px;\n  background: #ededed;\n  color: #0a0a0a;\n  font-size: 12px;\n  font-weight: 600;\n  white-space: nowrap;\n}\n.hb-yj5-pill-ghost { background: rgba(255, 255, 255, .06); color: #a1a1a1; }\n.hb-yj5-tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }\n.hb-yj5-tpl {\n  padding: 10px;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background: rgba(255, 255, 255, .02);\n  font-size: 13px;\n  font-weight: 500;\n}\n.hb-yj5-tpl-on { border-color: var(--hb-yj5-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-yj5-accent) 18%, transparent); }\n.hb-yj5-thumb { height: 74px; margin-bottom: 9px; border-radius: 8px; }\n.hb-yj5-tpl small { display: block; margin-top: 2px; color: #6b6b6b; font-size: 11.5px; font-weight: 400; }\n.hb-yj5-invite { display: flex; gap: 8px; margin-bottom: 14px; }\n.hb-yj5-input {\n  flex: 1;\n  min-width: 0;\n  padding: 10px 12px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: #0a0a0a;\n  color: #8f8f8f;\n  font-size: 13px;\n  white-space: nowrap;\n  overflow: hidden;\n}\n.hb-yj5-input::after { content: \"\"; display: inline-block; width: 1px; height: 14px; margin-left: 2px; vertical-align: -2px; background: var(--hb-yj5-accent); animation: hb-yj5-caret 1s steps(1) infinite; }\n.hb-yj5-av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #0a0a0a; font-size: 11px; font-weight: 700; }\n.hb-yj5-log {\n  padding: 14px;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background: #080808;\n  font: 400 12.5px/1.9 ui-monospace, SFMono-Regular, Menlo, monospace;\n  color: #a1a1a1;\n}\n.hb-yj5-log div { opacity: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.hb-yj5-screen[data-on=\"true\"] .hb-yj5-log div { animation: hb-yj5-line .35s ease forwards; }\n.hb-yj5-ok { color: #4ade80; }\n.hb-yj5-live {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  margin-top: 12px;\n  padding: 12px 14px;\n  border-radius: 12px;\n  background: color-mix(in srgb, var(--hb-yj5-accent) 10%, transparent);\n  border: 1px solid color-mix(in srgb, var(--hb-yj5-accent) 30%, transparent);\n  font-size: 13px;\n}\n.hb-yj5-live b { color: var(--hb-yj5-accent); font-weight: 600; }\n.hb-yj5-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }\n@keyframes hb-yj5-fill { to { transform: scaleX(1); } }\n@keyframes hb-yj5-caret { 50% { opacity: 0; } }\n@keyframes hb-yj5-line { to { opacity: 1; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-yj5 *, .hb-yj5 *::before, .hb-yj5 *::after { animation: none !important; transition: none !important; }\n  .hb-yj5-log div { opacity: 1; }\n}\n`;\n\nconst repos = [\n  { name: \"acme/storefront\", meta: \"Next.js · 2h ago\", on: true },\n  { name: \"acme/docs\", meta: \"Astro · yesterday\", on: false },\n  { name: \"acme/api-gateway\", meta: \"Node · 3d ago\", on: false },\n  { name: \"acme/design-tokens\", meta: \"Vite · 1w ago\", on: false },\n];\n\nconst templates = [\n  { name: \"Commerce\", note: \"Cart, checkout, CMS\", bg: \"linear-gradient(135deg, #0e7490, #164e63 60%, #0a0a0a)\" },\n  { name: \"SaaS starter\", note: \"Auth, billing, dashboard\", bg: \"linear-gradient(135deg, #6d28d9, #312e81 60%, #0a0a0a)\" },\n  { name: \"Docs\", note: \"MDX, search, versioning\", bg: \"linear-gradient(135deg, #b45309, #78350f 60%, #0a0a0a)\" },\n  { name: \"Blank\", note: \"Your own setup\", bg: \"repeating-linear-gradient(45deg, #161616 0 8px, #121212 8px 16px)\" },\n];\n\nconst people = [\n  { name: \"Priya Nair\", email: \"priya@acme.dev\", role: \"Owner\", c: \"#22d3ee\" },\n  { name: \"Jonas Weber\", email: \"jonas@acme.dev\", role: \"Reviewer\", c: \"#a78bfa\" },\n  { name: \"Léa Martin\", email: \"lea@acme.dev\", role: \"Pending\", c: \"#fbbf24\" },\n];\n\nconst logLines = [\n  [\"$\", \"git push origin main\"],\n  [\"\", \"Cloning acme/storefront at 8f3c2a1\"],\n  [\"\", \"Installing 412 packages in 6.2s\"],\n  [\"\", \"Building 38 routes, 4 edge functions\"],\n  [\"ok\", \"Compiled successfully in 21.4s\"],\n  [\"ok\", \"Deployed to 18 regions\"],\n];\n\nfunction Folder() {\n  return (\n    <svg width=\"15\" height=\"15\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n      <path d=\"M2 4.5A1.5 1.5 0 0 1 3.5 3h2.8l1.4 1.5h4.8A1.5 1.5 0 0 1 14 6v5.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 11.5v-7Z\" stroke=\"currentColor\" strokeWidth=\"1.3\" />\n    </svg>\n  );\n}\n\nfunction Screen({ kind }: { kind: number }) {\n  if (kind === 0) {\n    return (\n      <>\n        <p className=\"hb-yj5-label\">Import a repository</p>\n        {repos.map((r) => (\n          <div className=\"hb-yj5-row\" key={r.name}>\n            <span className=\"hb-yj5-ico\">\n              <Folder />\n            </span>\n            <span>{r.name}</span>\n            <span className=\"hb-yj5-meta\">{r.meta}</span>\n            <span className={r.on ? \"hb-yj5-pill\" : \"hb-yj5-pill hb-yj5-pill-ghost\"}>{r.on ? \"Import\" : \"Select\"}</span>\n          </div>\n        ))}\n      </>\n    );\n  }\n  if (kind === 1) {\n    return (\n      <>\n        <p className=\"hb-yj5-label\">Pick a template</p>\n        <div className=\"hb-yj5-tpls\">\n          {templates.map((t, i) => (\n            <div className={i === 1 ? \"hb-yj5-tpl hb-yj5-tpl-on\" : \"hb-yj5-tpl\"} key={t.name}>\n              <div className=\"hb-yj5-thumb\" style={{ background: t.bg }} />\n              {t.name}\n              <small>{t.note}</small>\n            </div>\n          ))}\n        </div>\n      </>\n    );\n  }\n  if (kind === 2) {\n    return (\n      <>\n        <p className=\"hb-yj5-label\">Team · 3 of 10 seats</p>\n        <div className=\"hb-yj5-invite\">\n          <span className=\"hb-yj5-input\">marcus@acme.dev</span>\n          <span className=\"hb-yj5-pill\" style={{ marginLeft: 0, alignSelf: \"center\" }}>\n            Send invite\n          </span>\n        </div>\n        {people.map((p) => (\n          <div className=\"hb-yj5-row\" key={p.email}>\n            <span className=\"hb-yj5-av\" style={{ background: p.c }}>\n              {p.name\n                .split(\" \")\n                .map((x) => x[0])\n                .join(\"\")}\n            </span>\n            <span>\n              {p.name}\n              <span style={{ display: \"block\", color: \"#6b6b6b\", fontSize: 12 }}>{p.email}</span>\n            </span>\n            <span className=\"hb-yj5-meta\">{p.role}</span>\n          </div>\n        ))}\n      </>\n    );\n  }\n  return (\n    <>\n      <p className=\"hb-yj5-label\">Production deployment</p>\n      <div className=\"hb-yj5-log\">\n        {logLines.map(([k, t], i) => (\n          <div key={i} style={{ animationDelay: `${(i * 0.22).toFixed(2)}s` }}>\n            {k === \"ok\" ? <span className=\"hb-yj5-ok\">✓ </span> : k ? <span style={{ color: \"#ededed\" }}>{k} </span> : <span>  </span>}\n            {t}\n          </div>\n        ))}\n      </div>\n      <div className=\"hb-yj5-live\">\n        <span className=\"hb-yj5-dot\" />\n        Live at <b>storefront.acme.dev</b>\n        <span className=\"hb-yj5-meta\">41s total</span>\n      </div>\n    </>\n  );\n}\n\nconst urls = [\"app.shipline.dev/new\", \"app.shipline.dev/new/template\", \"app.shipline.dev/acme/team\", \"app.shipline.dev/acme/deployments\"];\n\nexport function HowStepperScreens({\n  eyebrow = \"How it works\",\n  title = \"From repository to production in four steps\",\n  subtitle = \"No config files to write and no servers to babysit. Click through the flow to see each screen.\",\n  steps = defaultSteps,\n  step,\n  defaultStep = 0,\n  onStepChange,\n  autoplay = true,\n  interval = 5000,\n  accent = \"#22d3ee\",\n  className,\n  style,\n  ...rest\n}: HowStepperScreensProps) {\n  const [inner, setInner] = React.useState(defaultStep);\n  const [paused, setPaused] = React.useState(false);\n  const [cycle, setCycle] = React.useState(0);\n  const current = step ?? inner;\n  const n = steps.length;\n  const baseId = React.useId();\n\n  const go = React.useCallback(\n    (i: number) => {\n      const next = ((i % n) + n) % n;\n      if (step === undefined) setInner(next);\n      setCycle((c) => c + 1);\n      onStepChange?.(next);\n    },\n    [n, step, onStepChange],\n  );\n\n  React.useEffect(() => {\n    if (!autoplay || paused || n < 2) return;\n    if (window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches) return;\n    const id = window.setTimeout(() => go(current + 1), Math.max(1500, interval));\n    return () => window.clearTimeout(id);\n  }, [autoplay, paused, current, interval, go, n, cycle]);\n\n  const onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n    const map: Record<string, number> = { ArrowDown: 1, ArrowRight: 1, ArrowUp: -1, ArrowLeft: -1 };\n    if (e.key in map) {\n      e.preventDefault();\n      go(current + map[e.key]);\n      const btns = e.currentTarget.querySelectorAll<HTMLButtonElement>(\"[role=tab]\");\n      btns[((current + map[e.key]) % n + n) % n]?.focus();\n    } else if (e.key === \"Home\" || e.key === \"End\") {\n      e.preventDefault();\n      const t = e.key === \"Home\" ? 0 : n - 1;\n      go(t);\n      e.currentTarget.querySelectorAll<HTMLButtonElement>(\"[role=tab]\")[t]?.focus();\n    }\n  };\n\n  const rootClass = [\"hb-yj5\", autoplay ? \"hb-yj5-run\" : \"\", paused ? \"hb-yj5-paused\" : \"\", className].filter(Boolean).join(\" \");\n\n  return (\n    <section\n      className={rootClass}\n      style={{ \"--hb-yj5-accent\": accent, \"--hb-yj5-dur\": `${Math.max(1500, interval)}ms`, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-how-stepper-screens\" precedence=\"default\">{css}</style>\n      <div className=\"hb-yj5-inner\">\n        <div className=\"hb-yj5-head\">\n          {eyebrow ? <p className=\"hb-yj5-eyebrow\">{eyebrow}</p> : null}\n          <h2 className=\"hb-yj5-title\">{title}</h2>\n          {subtitle ? <p className=\"hb-yj5-sub\">{subtitle}</p> : null}\n        </div>\n        <div\n          className=\"hb-yj5-body\"\n          onPointerEnter={() => setPaused(true)}\n          onPointerLeave={() => {\n            setPaused(false);\n            setCycle((c) => c + 1);\n          }}\n        >\n          <div className=\"hb-yj5-list\" role=\"tablist\" aria-orientation=\"vertical\" onKeyDown={onKeyDown}>\n            {steps.map((s, i) => (\n              <button\n                key={s.title + i}\n                type=\"button\"\n                role=\"tab\"\n                id={`${baseId}-tab-${i}`}\n                aria-selected={current === i}\n                aria-controls={`${baseId}-panel`}\n                tabIndex={current === i ? 0 : -1}\n                className={i < current ? \"hb-yj5-step hb-yj5-done\" : \"hb-yj5-step\"}\n                onClick={() => go(i)}\n              >\n                <span className=\"hb-yj5-num\">{String(i + 1).padStart(2, \"0\")}</span>\n                <span>\n                  <span className=\"hb-yj5-step-title\">{s.title}</span>\n                  <span className=\"hb-yj5-desc\">\n                    <span>\n                      <span>{s.description}</span>\n                    </span>\n                  </span>\n                </span>\n                <span className=\"hb-yj5-prog\" aria-hidden=\"true\">\n                  <i key={`${current}-${cycle}`} />\n                </span>\n              </button>\n            ))}\n          </div>\n          <div className=\"hb-yj5-window\" id={`${baseId}-panel`} role=\"tabpanel\" aria-labelledby={`${baseId}-tab-${current}`}>\n            <div className=\"hb-yj5-chrome\" aria-hidden=\"true\">\n              <i />\n              <i />\n              <i />\n              <span className=\"hb-yj5-url\">{urls[current % 4]}</span>\n            </div>\n            <div className=\"hb-yj5-stage\">\n              {steps.map((_, i) => (\n                <div key={i} className=\"hb-yj5-screen\" data-on={current === i} aria-hidden={current !== i}>\n                  <Screen kind={i % 4} />\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}