{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "features-tabs",
  "type": "registry:component",
  "title": "Features Tabs",
  "description": "A vertical tab list with a progress bar that advances to the next feature every few seconds, beside a window that crossfades between product mockups. Hover pauses it and arrow keys move between tabs.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "features",
    "features",
    "tabs",
    "autoplay",
    "progress",
    "mockup",
    "section"
  ],
  "docs": "https://hyperblur.dev/effects/features-tabs",
  "files": [
    {
      "path": "registry/hyperblur/features-tabs.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/features-tabs.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface TabFeature {\n  title: string;\n  description: string;\n  visual?: React.ReactNode;\n}\n\nexport interface FeaturesTabsProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onChange\" | \"defaultValue\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  features?: TabFeature[];\n  value?: number;\n  defaultValue?: number;\n  onChange?: (index: number) => void;\n  interval?: number;\n  autoPlay?: boolean;\n  accent?: string;\n}\n\nconst css = `\n.hb-ka3 {\n  --hb-ka3-accent: #2f7bff;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-ka3 *, .hb-ka3 *::before, .hb-ka3 *::after { box-sizing: border-box; }\n.hb-ka3-wrap { max-width: 1120px; margin: 0 auto; padding: 88px 24px 104px; }\n.hb-ka3-head { max-width: 640px; margin-bottom: 48px; }\n.hb-ka3-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin: 0 0 16px;\n  padding: 4px 10px 4px 4px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 999px;\n  background: #111;\n  color: #a1a1a1;\n  font-size: 12.5px;\n}\n.hb-ka3-eyebrow b {\n  padding: 2px 8px;\n  border-radius: 999px;\n  background: color-mix(in srgb, var(--hb-ka3-accent) 18%, transparent);\n  color: color-mix(in srgb, var(--hb-ka3-accent) 65%, #fff);\n  font-size: 11px;\n  font-weight: 600;\n}\n.hb-ka3-title {\n  margin: 0;\n  font-size: clamp(28px, 4cqw, 42px);\n  font-weight: 600;\n  line-height: 1.08;\n  letter-spacing: -.03em;\n  text-wrap: balance;\n}\n.hb-ka3-sub { margin: 14px 0 0; color: #8f8f8f; font-size: 16px; line-height: 1.6; }\n.hb-ka3-body {\n  display: grid;\n  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);\n  align-items: start;\n  gap: 48px;\n}\n.hb-ka3-list { display: flex; flex-direction: column; gap: 4px; }\n.hb-ka3-tab {\n  position: relative;\n  display: block;\n  width: 100%;\n  padding: 16px 18px 16px 26px;\n  border: 1px solid transparent;\n  border-radius: 14px;\n  background: transparent;\n  color: inherit;\n  font: inherit;\n  text-align: left;\n  cursor: pointer;\n  transition: background .25s ease, border-color .25s ease;\n}\n.hb-ka3-tab:hover { background: rgba(255, 255, 255, .025); }\n.hb-ka3-tab[aria-selected=\"true\"] {\n  border-color: rgba(255, 255, 255, .08);\n  background: linear-gradient(180deg, #141416, #101011);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);\n}\n.hb-ka3-tab:focus-visible { outline: 2px solid var(--hb-ka3-accent); outline-offset: 2px; }\n.hb-ka3-track {\n  position: absolute;\n  left: 12px;\n  top: 18px;\n  bottom: 18px;\n  width: 2px;\n  overflow: hidden;\n  border-radius: 2px;\n  background: rgba(255, 255, 255, .08);\n}\n.hb-ka3-fill {\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  background: var(--hb-ka3-accent);\n  box-shadow: 0 0 10px var(--hb-ka3-accent);\n  transform: scaleY(0);\n  transform-origin: top;\n}\n.hb-ka3-tab[aria-selected=\"true\"] .hb-ka3-fill { transform: scaleY(1); }\n.hb-ka3[data-auto=\"true\"] .hb-ka3-tab[aria-selected=\"true\"] .hb-ka3-fill {\n  animation: hb-ka3-progress var(--hb-ka3-ms, 5000ms) linear forwards;\n}\n.hb-ka3-body:hover .hb-ka3-fill { animation-play-state: paused !important; }\n@keyframes hb-ka3-progress { from { transform: scaleY(0); } to { transform: scaleY(1); } }\n.hb-ka3-tab-title {\n  display: block;\n  color: #8f8f8f;\n  font-size: 16px;\n  font-weight: 600;\n  letter-spacing: -.01em;\n  transition: color .25s ease;\n}\n.hb-ka3-tab[aria-selected=\"true\"] .hb-ka3-tab-title, .hb-ka3-tab:hover .hb-ka3-tab-title { color: #ededed; }\n.hb-ka3-more {\n  display: grid;\n  grid-template-rows: 0fr;\n  transition: grid-template-rows .4s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-ka3-tab[aria-selected=\"true\"] .hb-ka3-more { grid-template-rows: 1fr; }\n.hb-ka3-more > span { overflow: hidden; }\n.hb-ka3-desc { display: block; padding-top: 8px; color: #8f8f8f; font-size: 14px; line-height: 1.6; }\n.hb-ka3-panel {\n  position: relative;\n  min-width: 0;\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 20px;\n  background:\n    radial-gradient(90% 70% at 80% 0%, color-mix(in srgb, var(--hb-ka3-accent) 20%, transparent), transparent 60%),\n    linear-gradient(180deg, #121214, #0b0b0c);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -40px rgba(0, 0, 0, .9);\n}\n.hb-ka3-chrome {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  height: 40px;\n  padding: 0 16px;\n  border-bottom: 1px solid rgba(255, 255, 255, .06);\n}\n.hb-ka3-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .12); }\n.hb-ka3-chrome span {\n  margin: 0 auto;\n  padding: 3px 12px;\n  border-radius: 6px;\n  background: rgba(255, 255, 255, .04);\n  color: #8f8f8f;\n  font-size: 11.5px;\n  transform: translateX(-18px);\n}\n.hb-ka3-panes { position: relative; aspect-ratio: 16 / 11; }\n.hb-ka3-pane {\n  position: absolute;\n  inset: 0;\n  padding: 22px;\n  opacity: 0;\n  transform: translateY(10px) scale(.985);\n  filter: blur(6px);\n  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1), filter .5s ease;\n  pointer-events: none;\n}\n.hb-ka3-pane[data-on=\"true\"] { opacity: 1; transform: none; filter: none; pointer-events: auto; }\n.hb-ka3-m { display: flex; flex-direction: column; height: 100%; gap: 10px; font-size: 12px; color: #a1a1a1; }\n.hb-ka3-mh { display: flex; align-items: center; justify-content: space-between; color: #8f8f8f; font-size: 12px; }\n.hb-ka3-mh b { color: #ededed; font-weight: 600; font-size: 13px; }\n.hb-ka3-chip {\n  padding: 3px 9px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 999px;\n  font-size: 11px;\n  color: #a1a1a1;\n}\n.hb-ka3-gantt {\n  position: relative;\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  justify-content: space-around;\n  padding: 8px 0;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background-color: rgba(10, 10, 10, .6);\n  background-image: linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);\n  background-size: 10% 100%;\n  background-position: 0 0;\n}\n.hb-ka3-grow { display: grid; grid-template-columns: 28% 1fr; align-items: center; padding: 0 12px; gap: 8px; }\n.hb-ka3-grow > span { overflow: hidden; color: #c8c8c8; text-overflow: ellipsis; white-space: nowrap; }\n.hb-ka3-lane { position: relative; height: 22px; }\n.hb-ka3-gbar {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  padding: 0 6px;\n  border-radius: 7px;\n  color: #0a0a0a;\n  font-size: 10.5px;\n  font-weight: 600;\n  white-space: nowrap;\n  overflow: hidden;\n  transform: scaleX(0);\n  transform-origin: left;\n  transition: transform .7s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-ka3-pane[data-on=\"true\"] .hb-ka3-gbar { transform: scaleX(1); }\n.hb-ka3-gbar i {\n  width: 14px;\n  height: 14px;\n  border-radius: 50%;\n  background: rgba(10, 10, 10, .25);\n  flex: none;\n}\n.hb-ka3-code {\n  flex: 1;\n  overflow: hidden;\n  padding: 14px 0;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background: rgba(8, 8, 9, .8);\n  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n  font-size: 12px;\n  line-height: 1.9;\n}\n.hb-ka3-ln { display: flex; gap: 16px; padding: 0 16px; white-space: pre; }\n.hb-ka3-ln em { width: 16px; flex: none; color: #4a4a4a; font-style: normal; text-align: right; }\n.hb-ka3-ln[data-hl=\"true\"] { background: color-mix(in srgb, var(--hb-ka3-accent) 10%, transparent); box-shadow: inset 2px 0 0 var(--hb-ka3-accent); }\n.hb-ka3-k { color: #c792ea; }\n.hb-ka3-s { color: #9ece6a; }\n.hb-ka3-f { color: #7fb3ff; }\n.hb-ka3-c { color: #5c5c5c; }\n.hb-ka3-caret {\n  position: relative;\n  display: inline-block;\n  width: 2px;\n  height: 15px;\n  margin-left: 1px;\n  vertical-align: -3px;\n  background: var(--hb-ka3-accent);\n  animation: hb-ka3-blink 1s steps(1) infinite;\n}\n.hb-ka3-caret b {\n  position: absolute;\n  left: 0;\n  bottom: 100%;\n  padding: 1px 5px;\n  border-radius: 4px 4px 4px 0;\n  background: var(--hb-ka3-accent);\n  color: #fff;\n  font-family: inherit;\n  font-size: 9.5px;\n  font-weight: 600;\n  line-height: 1.4;\n}\n@keyframes hb-ka3-blink { 50% { opacity: .2; } }\n.hb-ka3-diff {\n  overflow: hidden;\n  border: 1px solid rgba(255, 255, 255, .06);\n  border-radius: 12px;\n  background: rgba(8, 8, 9, .8);\n  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n  font-size: 11.5px;\n  line-height: 1.9;\n}\n.hb-ka3-dl { padding: 0 14px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }\n.hb-ka3-dl[data-t=\"-\"] { background: rgba(248, 81, 73, .1); color: #ffa198; }\n.hb-ka3-dl[data-t=\"+\"] { background: rgba(46, 160, 67, .12); color: #7ee2a0; }\n.hb-ka3-cmt { display: flex; gap: 10px; align-items: flex-start; }\n.hb-ka3-av {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex: none;\n  width: 26px;\n  height: 26px;\n  border-radius: 50%;\n  color: #0a0a0a;\n  font-size: 10px;\n  font-weight: 700;\n}\n.hb-ka3-bubble {\n  flex: 1;\n  min-width: 0;\n  padding: 9px 12px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 4px 12px 12px 12px;\n  background: #151517;\n  color: #c8c8c8;\n  line-height: 1.5;\n}\n.hb-ka3-bubble b { color: #ededed; font-weight: 600; margin-right: 6px; }\n.hb-ka3-ok {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  align-self: flex-start;\n  padding: 5px 10px;\n  border-radius: 999px;\n  background: rgba(46, 160, 67, .14);\n  color: #7ee2a0;\n  font-size: 11.5px;\n  font-weight: 600;\n}\n.hb-ka3-steps { display: flex; flex-direction: column; gap: 8px; }\n.hb-ka3-step {\n  display: grid;\n  grid-template-columns: 22px 1fr auto;\n  align-items: center;\n  gap: 10px;\n  padding: 10px 12px;\n  border: 1px solid rgba(255, 255, 255, .07);\n  border-radius: 12px;\n  background: rgba(20, 20, 22, .9);\n  opacity: 0;\n  transform: translateY(6px);\n  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1);\n}\n.hb-ka3-pane[data-on=\"true\"] .hb-ka3-step { opacity: 1; transform: none; }\n.hb-ka3-step b { color: #ededed; font-weight: 500; }\n.hb-ka3-step span { color: #6f6f6f; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 11px; }\n.hb-ka3-tick {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 22px;\n  height: 22px;\n  border-radius: 50%;\n  background: rgba(46, 160, 67, .16);\n  color: #7ee2a0;\n}\n.hb-ka3-tick[data-live=\"true\"] { background: color-mix(in srgb, var(--hb-ka3-accent) 20%, transparent); color: var(--hb-ka3-accent); }\n.hb-ka3-tick svg { width: 12px; height: 12px; }\n.hb-ka3-prog { height: 6px; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, .06); }\n.hb-ka3-prog i {\n  display: block;\n  width: 62%;\n  height: 100%;\n  border-radius: inherit;\n  background: linear-gradient(90deg, color-mix(in srgb, var(--hb-ka3-accent) 50%, transparent), var(--hb-ka3-accent));\n  transform: scaleX(0);\n  transform-origin: left;\n  transition: transform 1.2s cubic-bezier(.2, .8, .2, 1) .5s;\n}\n.hb-ka3-pane[data-on=\"true\"] .hb-ka3-prog i { transform: scaleX(1); }\n.hb-ka3-regions { display: flex; flex-wrap: wrap; gap: 6px; }\n.hb-ka3-regions span {\n  display: inline-flex;\n  align-items: center;\n  gap: 6px;\n  padding: 3px 8px;\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .04);\n  font-size: 11px;\n}\n.hb-ka3-regions span::before { content: \"\"; width: 6px; height: 6px; border-radius: 50%; background: var(--hb-c, #7ee2a0); }\n@container (max-width: 820px) {\n  .hb-ka3-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }\n  .hb-ka3-head { margin-bottom: 36px; }\n}\n@container (max-width: 520px) {\n  .hb-ka3-wrap { padding: 64px 16px 72px; }\n  .hb-ka3-panes { aspect-ratio: 4 / 4; }\n  .hb-ka3-pane { padding: 14px; }\n  .hb-ka3-tab { padding: 14px 14px 14px 24px; }\n  .hb-ka3-code { font-size: 11px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ka3-pane, .hb-ka3-more, .hb-ka3-gbar, .hb-ka3-step, .hb-ka3-prog i, .hb-ka3-tab, .hb-ka3-tab-title { transition: none; }\n  .hb-ka3[data-auto=\"true\"] .hb-ka3-tab[aria-selected=\"true\"] .hb-ka3-fill, .hb-ka3-caret { animation: none; }\n  .hb-ka3-pane { filter: none; transform: none; }\n}\n`;\n\nfunction Tick() {\n  return (\n    <svg viewBox=\"0 0 12 12\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n      <path d=\"M2.5 6.2l2.2 2.2 4.8-4.8\" />\n    </svg>\n  );\n}\n\nconst ganttRows = [\n  { t: \"Usage-based invoices\", l: 0, w: 46, c: \"#7fb3ff\", who: \"Mei\" },\n  { t: \"Tax rules for EU\", l: 20, w: 40, c: \"#c4b5fd\", who: \"Arjun\" },\n  { t: \"Dunning emails\", l: 38, w: 34, c: \"#86efac\", who: \"Sara\" },\n  { t: \"Revenue report v2\", l: 50, w: 44, c: \"#fcd34d\", who: \"Leo\" },\n  { t: \"Migration script\", l: 70, w: 28, c: \"#f9a8d4\", who: \"Kofi\" },\n];\n\nfunction PlanMock() {\n  return (\n    <div className=\"hb-ka3-m\">\n      <div className=\"hb-ka3-mh\">\n        <b>Cycle 24 &middot; Billing</b>\n        <span className=\"hb-ka3-chip\">Nov 4 &ndash; Nov 15</span>\n      </div>\n      <div className=\"hb-ka3-gantt\">\n        {ganttRows.map((r, i) => (\n          <div key={r.t} className=\"hb-ka3-grow\">\n            <span>{r.t}</span>\n            <div className=\"hb-ka3-lane\">\n              <div\n                className=\"hb-ka3-gbar\"\n                style={{ left: `${r.l}%`, width: `${r.w}%`, background: r.c, transitionDelay: `${(0.12 + i * 0.08).toFixed(2)}s` }}\n              >\n                <i aria-hidden=\"true\" />\n                {r.who}\n              </div>\n            </div>\n          </div>\n        ))}\n      </div>\n    </div>\n  );\n}\n\nfunction WriteMock() {\n  return (\n    <div className=\"hb-ka3-m\">\n      <div className=\"hb-ka3-mh\">\n        <b>invoices.ts</b>\n        <span className=\"hb-ka3-chip\">3 editing</span>\n      </div>\n      <div className=\"hb-ka3-code\">\n        <div className=\"hb-ka3-ln\"><em>1</em><span><span className=\"hb-ka3-k\">export async function</span> <span className=\"hb-ka3-f\">draftInvoice</span>(account) {\"{\"}</span></div>\n        <div className=\"hb-ka3-ln\"><em>2</em><span>  <span className=\"hb-ka3-k\">const</span> usage = <span className=\"hb-ka3-k\">await</span> <span className=\"hb-ka3-f\">meter</span>(account.id)</span></div>\n        <div className=\"hb-ka3-ln\"><em>3</em><span>  <span className=\"hb-ka3-c\">{\"#\"} billed per 1k requests</span></span></div>\n        <div className=\"hb-ka3-ln\" data-hl=\"true\"><em>4</em><span>  <span className=\"hb-ka3-k\">const</span> total = usage.requests * <span className=\"hb-ka3-s\">0.42</span><span className=\"hb-ka3-caret\"><b>Mei</b></span></span></div>\n        <div className=\"hb-ka3-ln\"><em>5</em><span>  <span className=\"hb-ka3-k\">return</span> {\"{\"} currency: <span className=\"hb-ka3-s\">&quot;usd&quot;</span>, total {\"}\"}</span></div>\n        <div className=\"hb-ka3-ln\"><em>6</em><span>{\"}\"}</span></div>\n      </div>\n    </div>\n  );\n}\n\nfunction ReviewMock() {\n  return (\n    <div className=\"hb-ka3-m\">\n      <div className=\"hb-ka3-mh\">\n        <b>#482 Usage-based invoices</b>\n        <span className=\"hb-ka3-ok\">\n          <Tick />\n          Approved\n        </span>\n      </div>\n      <div className=\"hb-ka3-diff\">\n        <div className=\"hb-ka3-dl\" data-t=\"-\">- const total = usage.requests * 0.5</div>\n        <div className=\"hb-ka3-dl\" data-t=\"+\">+ const total = usage.requests * 0.42</div>\n        <div className=\"hb-ka3-dl\" data-t=\"+\">+ if (account.annual) total *= 0.9</div>\n      </div>\n      <div className=\"hb-ka3-cmt\">\n        <span className=\"hb-ka3-av\" style={{ background: \"#c4b5fd\" }} aria-hidden=\"true\">AK</span>\n        <div className=\"hb-ka3-bubble\"><b>Arjun</b>Matches the new price sheet. Can we cover annual plans in a test?</div>\n      </div>\n      <div className=\"hb-ka3-cmt\">\n        <span className=\"hb-ka3-av\" style={{ background: \"#7fb3ff\" }} aria-hidden=\"true\">ML</span>\n        <div className=\"hb-ka3-bubble\"><b>Mei</b>Added two cases, both green. Merging after lunch.</div>\n      </div>\n    </div>\n  );\n}\n\nfunction ShipMock() {\n  const steps = [\n    { t: \"Build\", s: \"41s\" },\n    { t: \"Tests\", s: \"1,284 passed\" },\n    { t: \"Preview\", s: \"ready\" },\n  ];\n  return (\n    <div className=\"hb-ka3-m\">\n      <div className=\"hb-ka3-mh\">\n        <b>Deploy &middot; main@8f2c1a</b>\n        <span className=\"hb-ka3-chip\">2 min ago</span>\n      </div>\n      <div className=\"hb-ka3-steps\">\n        {steps.map((s, i) => (\n          <div key={s.t} className=\"hb-ka3-step\" style={{ transitionDelay: `${(0.1 + i * 0.12).toFixed(2)}s` }}>\n            <span className=\"hb-ka3-tick\"><Tick /></span>\n            <b>{s.t}</b>\n            <span>{s.s}</span>\n          </div>\n        ))}\n        <div className=\"hb-ka3-step\" style={{ transitionDelay: \".46s\" }}>\n          <span className=\"hb-ka3-tick\" data-live=\"true\"><Tick /></span>\n          <b>Production</b>\n          <span>62% of traffic</span>\n        </div>\n      </div>\n      <div className=\"hb-ka3-prog\"><i /></div>\n      <div className=\"hb-ka3-regions\">\n        <span>Frankfurt</span>\n        <span>Virginia</span>\n        <span>Tokyo</span>\n        <span style={{ \"--hb-c\": \"#fcd34d\" } as React.CSSProperties}>Sydney</span>\n      </div>\n    </div>\n  );\n}\n\nconst builtIn: React.ReactNode[] = [<PlanMock key=\"plan\" />, <WriteMock key=\"write\" />, <ReviewMock key=\"review\" />, <ShipMock key=\"ship\" />];\n\nconst defaultFeatures: TabFeature[] = [\n  { title: \"Plan the cycle\", description: \"Drag scope into a two-week cycle and see who is overbooked before anyone says yes.\" },\n  { title: \"Write it together\", description: \"Specs and code live side by side, with live cursors and comments pinned to the exact line.\" },\n  { title: \"Review in context\", description: \"Diffs, preview links and discussion in one thread, so approvals take minutes instead of days.\" },\n  { title: \"Ship without the drama\", description: \"Gradual rollouts across regions with automatic rollback the moment error rates climb.\" },\n];\n\nexport function FeaturesTabs({\n  eyebrow = \"Workflow\",\n  title = \"One workspace from first sketch to production\",\n  subtitle = \"Linework keeps planning, writing, review and release in the same place, so context never gets lost between tools.\",\n  features = defaultFeatures,\n  value,\n  defaultValue = 0,\n  onChange,\n  interval = 5000,\n  autoPlay = true,\n  accent = \"#2f7bff\",\n  className = \"\",\n  style,\n  ...rest\n}: FeaturesTabsProps) {\n  const uid = React.useId();\n  const [inner, setInner] = React.useState(defaultValue);\n  const count = features.length;\n  const active = Math.min(Math.max(value ?? inner, 0), Math.max(count - 1, 0));\n  const tabs = React.useRef<(HTMLButtonElement | null)[]>([]);\n\n  function select(i: number) {\n    const next = ((i % count) + count) % count;\n    if (value === undefined) setInner(next);\n    onChange?.(next);\n  }\n\n  function handleKey(e: React.KeyboardEvent<HTMLDivElement>) {\n    let next = -1;\n    if (e.key === \"ArrowDown\" || e.key === \"ArrowRight\") next = active + 1;\n    else if (e.key === \"ArrowUp\" || e.key === \"ArrowLeft\") next = active - 1;\n    else if (e.key === \"Home\") next = 0;\n    else if (e.key === \"End\") next = count - 1;\n    if (next === -1) return;\n    e.preventDefault();\n    const target = ((next % count) + count) % count;\n    select(target);\n    tabs.current[target]?.focus();\n  }\n\n  const vars = { \"--hb-ka3-accent\": accent, \"--hb-ka3-ms\": `${Math.max(interval, 500)}ms`, ...style } as React.CSSProperties;\n\n  return (\n    <section className={`hb-ka3 ${className}`} style={vars} data-auto={autoPlay && count > 1} aria-labelledby={`${uid}-t`} {...rest}>\n      <style href=\"hb-features-tabs\" precedence=\"default\">{css}</style>\n      <div className=\"hb-ka3-wrap\">\n        <header className=\"hb-ka3-head\">\n          {eyebrow && (\n            <p className=\"hb-ka3-eyebrow\">\n              <b>{count} steps</b>\n              {eyebrow}\n            </p>\n          )}\n          <h2 id={`${uid}-t`} className=\"hb-ka3-title\">{title}</h2>\n          {subtitle && <p className=\"hb-ka3-sub\">{subtitle}</p>}\n        </header>\n        <div className=\"hb-ka3-body\">\n          <div className=\"hb-ka3-list\" role=\"tablist\" aria-orientation=\"vertical\" aria-label={title} onKeyDown={handleKey}>\n            {features.map((f, i) => (\n              <button\n                key={`${f.title}-${i}`}\n                ref={(el) => {\n                  tabs.current[i] = el;\n                }}\n                type=\"button\"\n                role=\"tab\"\n                id={`${uid}-tab-${i}`}\n                aria-selected={i === active}\n                aria-controls={`${uid}-pane-${i}`}\n                tabIndex={i === active ? 0 : -1}\n                className=\"hb-ka3-tab\"\n                onClick={() => select(i)}\n              >\n                <span className=\"hb-ka3-track\" aria-hidden=\"true\">\n                  <span\n                    key={i === active ? `on-${active}` : \"off\"}\n                    className=\"hb-ka3-fill\"\n                    onAnimationEnd={(e) => {\n                      if (e.animationName === \"hb-ka3-progress\" && i === active) select(active + 1);\n                    }}\n                  />\n                </span>\n                <span className=\"hb-ka3-tab-title\">{f.title}</span>\n                <span className=\"hb-ka3-more\">\n                  <span>\n                    <span className=\"hb-ka3-desc\">{f.description}</span>\n                  </span>\n                </span>\n              </button>\n            ))}\n          </div>\n          <div className=\"hb-ka3-panel\">\n            <div className=\"hb-ka3-chrome\" aria-hidden=\"true\">\n              <i />\n              <i />\n              <i />\n              <span>app.linework.dev</span>\n            </div>\n            <div className=\"hb-ka3-panes\">\n              {features.map((f, i) => (\n                <div\n                  key={`${f.title}-${i}`}\n                  role=\"tabpanel\"\n                  id={`${uid}-pane-${i}`}\n                  aria-labelledby={`${uid}-tab-${i}`}\n                  aria-hidden={i !== active}\n                  inert={i !== active}\n                  className=\"hb-ka3-pane\"\n                  data-on={i === active}\n                >\n                  {f.visual ?? builtIn[i % builtIn.length]}\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}