{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer-links-rail",
  "type": "registry:component",
  "title": "Footer Links Rail",
  "description": "A compact single row footer: brand, copyright, link groups as pill menus and a back to top button whose arrow launches up and drops back in. It wraps into stacked rows on small screens.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "footer",
    "footer",
    "compact",
    "pills",
    "back to top",
    "rail",
    "minimal"
  ],
  "docs": "https://hyperblur.dev/effects/footer-links-rail",
  "files": [
    {
      "path": "registry/hyperblur/footer-links-rail.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/footer-links-rail.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface FooterLinksRailLink {\n  label: string;\n  href: string;\n}\n\nexport interface FooterLinksRailGroup {\n  label: string;\n  links: FooterLinksRailLink[];\n}\n\nexport interface FooterLinksRailProps extends Omit<React.HTMLAttributes<HTMLElement>, \"children\"> {\n  brand?: string;\n  copyright?: string;\n  groups?: FooterLinksRailGroup[];\n  backToTopLabel?: string;\n  onBackToTop?: () => void;\n  accent?: string;\n  showBackdrop?: boolean;\n}\n\nconst css = `\n.hb-ke8 {\n  --hb-ke8-accent: #2f7bff;\n  position: relative;\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-ke8 *, .hb-ke8 *::before, .hb-ke8 *::after { box-sizing: border-box; }\n.hb-ke8-stage { position: relative; height: 470px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }\n.hb-ke8-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1120px; margin: 0 auto; padding: 40px 24px 0; opacity: .5; }\n.hb-ke8-cd { border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: #111; overflow: hidden; }\n.hb-ke8-img { height: 170px; }\n.hb-ke8-cb { padding: 18px; }\n.hb-ke8-ck { color: #8f8f8f; font-size: 12px; }\n.hb-ke8-ct { margin: 8px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }\n.hb-ke8-end { max-width: 1120px; margin: 0 auto; padding: 56px 24px 0; text-align: center; opacity: .55; }\n.hb-ke8-et { margin: 0; font-size: clamp(22px, 3cqi, 30px); font-weight: 600; letter-spacing: -.02em; }\n.hb-ke8-es { margin: 8px 0 0; color: #8f8f8f; font-size: 14px; }\n.hb-ke8-in { max-width: 1120px; margin: 0 auto; padding: 20px 24px 28px; }\n.hb-ke8-rail {\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  padding: 10px 10px 10px 18px;\n  border: 1px solid rgba(255,255,255,.08);\n  border-radius: 999px;\n  background: linear-gradient(180deg, #131313, #0f0f0f);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 40px -24px rgba(0,0,0,.8);\n}\n.hb-ke8-brand { display: inline-flex; align-items: center; gap: 9px; flex: none; color: #ededed; font-size: 15px; font-weight: 650; letter-spacing: -.01em; text-decoration: none; border-radius: 8px; }\n.hb-ke8-logo { position: relative; width: 22px; height: 22px; flex: none; }\n.hb-ke8-logo i { position: absolute; left: 0; height: 4px; border-radius: 2px; background: #ededed; }\n.hb-ke8-logo i:nth-child(1) { top: 3px; width: 22px; }\n.hb-ke8-logo i:nth-child(2) { top: 9px; width: 15px; background: var(--hb-ke8-accent); }\n.hb-ke8-logo i:nth-child(3) { top: 15px; width: 9px; opacity: .5; }\n.hb-ke8-id { display: flex; flex-direction: column; gap: 3px; flex: none; }\n.hb-ke8-copy { padding-left: 31px; color: #6f6f6f; font-size: 11.5px; white-space: nowrap; }\n.hb-ke8-groups {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 8px;\n  flex: 1;\n  min-width: 0;\n  overflow-x: auto;\n  scrollbar-width: none;\n}\n.hb-ke8-groups::-webkit-scrollbar { display: none; }\n.hb-ke8-group {\n  display: flex;\n  align-items: center;\n  gap: 2px;\n  flex: none;\n  padding: 3px;\n  border: 1px solid rgba(255,255,255,.07);\n  border-radius: 999px;\n  background: rgba(255,255,255,.02);\n}\n.hb-ke8-gl {\n  display: inline-flex;\n  align-items: center;\n  height: 28px;\n  padding: 0 6px 0 10px;\n  color: #6f6f6f;\n  font-size: 10.5px;\n  font-weight: 600;\n  letter-spacing: .08em;\n  text-transform: uppercase;\n  white-space: nowrap;\n}\n.hb-ke8-ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.hb-ke8-a {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  height: 28px;\n  padding: 0 10px;\n  border-radius: 999px;\n  color: #a1a1a1;\n  font-size: 13px;\n  font-weight: 500;\n  white-space: nowrap;\n  text-decoration: none;\n  transition: color .18s ease, background-color .18s ease;\n}\n.hb-ke8-a:hover { color: #fff; background: rgba(255,255,255,.07); }\n.hb-ke8-top {\n  position: relative;\n  display: inline-flex;\n  align-items: center;\n  gap: 10px;\n  flex: none;\n  height: 44px;\n  margin: 0;\n  padding: 0 4px 0 16px;\n  border: 1px solid rgba(255,255,255,.1);\n  border-radius: 999px;\n  background: #171717;\n  color: #ededed;\n  font: inherit;\n  font-size: 13px;\n  font-weight: 550;\n  cursor: pointer;\n  transition: border-color .2s ease, background-color .2s ease;\n}\n.hb-ke8-top:hover { border-color: color-mix(in srgb, var(--hb-ke8-accent) 55%, transparent); background: color-mix(in srgb, var(--hb-ke8-accent) 10%, #171717); }\n.hb-ke8-ar {\n  position: relative;\n  display: block;\n  width: 34px;\n  height: 34px;\n  overflow: hidden;\n  border-radius: 50%;\n  background: var(--hb-ke8-accent);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px -6px var(--hb-ke8-accent);\n}\n.hb-ke8-ar svg {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  width: 16px;\n  height: 16px;\n  margin: -8px 0 0 -8px;\n  fill: none;\n  stroke: #fff;\n  stroke-width: 2.2;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  transition: transform .45s cubic-bezier(.7,0,.2,1);\n}\n.hb-ke8-ar svg + svg { transform: translateY(34px); }\n.hb-ke8-top:hover .hb-ke8-ar svg:first-child, .hb-ke8-top:focus-visible .hb-ke8-ar svg:first-child { transform: translateY(-34px); }\n.hb-ke8-top:hover .hb-ke8-ar svg + svg, .hb-ke8-top:focus-visible .hb-ke8-ar svg + svg { transform: translateY(0); }\n.hb-ke8-top[data-launch=\"true\"] .hb-ke8-ar svg + svg { animation: hb-ke8-launch .7s cubic-bezier(.7,0,.2,1); }\n.hb-ke8 a:focus-visible, .hb-ke8 button:focus-visible { outline: 2px solid var(--hb-ke8-accent); outline-offset: 2px; }\n@keyframes hb-ke8-launch { 0% { transform: translateY(0); } 45% { transform: translateY(-34px); } 46% { transform: translateY(34px); } 100% { transform: translateY(0); } }\n@container (max-width: 1199px) {\n  .hb-ke8-tl { display: none; }\n  .hb-ke8-top { padding: 0 4px; }\n}\n@container (max-width: 1060px) {\n  .hb-ke8-rail { flex-wrap: wrap; border-radius: 24px; padding: 14px; row-gap: 14px; }\n  .hb-ke8-id { margin-right: auto; padding-left: 4px; }\n  .hb-ke8-groups { order: 3; flex: 1 0 100%; justify-content: flex-start; }\n  .hb-ke8-tl { display: inline; }\n  .hb-ke8-top { padding: 0 4px 0 16px; }\n}\n@container (max-width: 860px) {\n  .hb-ke8-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n  .hb-ke8-cards > :nth-child(3) { display: none; }\n}\n@container (max-width: 520px) {\n  .hb-ke8-in { padding: 16px 12px 20px; }\n  .hb-ke8-groups { flex-direction: column; align-items: flex-start; overflow: visible; }\n  .hb-ke8-group { max-width: 100%; overflow-x: auto; scrollbar-width: none; }\n  .hb-ke8-tl { display: none; }\n  .hb-ke8-top { padding: 0 4px; }\n  .hb-ke8-cards { grid-template-columns: minmax(0, 1fr); }\n  .hb-ke8-cards > :nth-child(2) { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ke8 *, .hb-ke8 *::before, .hb-ke8 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst defaultGroups: FooterLinksRailGroup[] = [\n  {\n    label: \"Product\",\n    links: [\n      { label: \"Features\", href: \"#\" },\n      { label: \"Pricing\", href: \"#\" },\n      { label: \"Docs\", href: \"#\" },\n    ],\n  },\n  {\n    label: \"Company\",\n    links: [\n      { label: \"About\", href: \"#\" },\n      { label: \"Blog\", href: \"#\" },\n      { label: \"Careers\", href: \"#\" },\n    ],\n  },\n  {\n    label: \"Legal\",\n    links: [\n      { label: \"Privacy\", href: \"#\" },\n      { label: \"Terms\", href: \"#\" },\n    ],\n  },\n];\n\nconst cards = [\n  { kind: \"Guide\", title: \"Routing 40,000 webhooks a minute without a queue\", hue: 218 },\n  { kind: \"Release\", title: \"Relay 5.2: replay any event from the last 30 days\", hue: 262 },\n  { kind: \"Story\", title: \"How Parcelwise cut delivery alerts from 9s to 400ms\", hue: 168 },\n];\n\nexport function FooterLinksRail({\n  brand = \"Relay\",\n  copyright = \"© 2026 Relay Systems\",\n  groups = defaultGroups,\n  backToTopLabel = \"Back to top\",\n  onBackToTop,\n  accent = \"#2f7bff\",\n  showBackdrop = true,\n  className = \"\",\n  style,\n  ...rest\n}: FooterLinksRailProps) {\n  const btnRef = React.useRef<HTMLButtonElement>(null);\n  const timer = React.useRef<number | undefined>(undefined);\n\n  React.useEffect(() => () => window.clearTimeout(timer.current), []);\n\n  function backToTop() {\n    const btn = btnRef.current;\n    if (btn) {\n      btn.dataset.launch = \"false\";\n      void btn.offsetWidth;\n      btn.dataset.launch = \"true\";\n      window.clearTimeout(timer.current);\n      timer.current = window.setTimeout(() => {\n        btn.dataset.launch = \"false\";\n      }, 750);\n    }\n    if (onBackToTop) {\n      onBackToTop();\n      return;\n    }\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    window.scrollTo({ top: 0, behavior: reduce ? \"auto\" : \"smooth\" });\n  }\n\n  return (\n    <footer className={`hb-ke8 ${className}`} style={{ \"--hb-ke8-accent\": accent, ...style } as React.CSSProperties} {...rest}>\n      <style href=\"hb-footer-links-rail\" precedence=\"default\">\n        {css}\n      </style>\n      {showBackdrop && (\n        <div className=\"hb-ke8-stage\" aria-hidden=\"true\">\n          <div className=\"hb-ke8-cards\">\n            {cards.map((card) => (\n              <div key={card.title} className=\"hb-ke8-cd\">\n                <div\n                  className=\"hb-ke8-img\"\n                  style={{\n                    background: `radial-gradient(80% 90% at 30% 20%, hsl(${card.hue} 70% 45% / .55), transparent 70%), radial-gradient(60% 70% at 90% 100%, hsl(${card.hue + 40} 70% 50% / .35), transparent 70%), #141414`,\n                  }}\n                />\n                <div className=\"hb-ke8-cb\">\n                  <div className=\"hb-ke8-ck\">{card.kind}</div>\n                  <p className=\"hb-ke8-ct\">{card.title}</p>\n                </div>\n              </div>\n            ))}\n          </div>\n          <div className=\"hb-ke8-end\">\n            <p className=\"hb-ke8-et\">You reached the end of the journal.</p>\n            <p className=\"hb-ke8-es\">New posts every other Thursday.</p>\n          </div>\n        </div>\n      )}\n      <div className=\"hb-ke8-in\">\n        <div className=\"hb-ke8-rail\">\n          <div className=\"hb-ke8-id\">\n            <a href=\"#\" className=\"hb-ke8-brand\" aria-label={`${brand} home`}>\n              <span className=\"hb-ke8-logo\" aria-hidden=\"true\">\n                <i />\n                <i />\n                <i />\n              </span>\n              {brand}\n            </a>\n            {copyright && <span className=\"hb-ke8-copy\">{copyright}</span>}\n          </div>\n          <div className=\"hb-ke8-groups\">\n            {groups.map((group) => (\n              <nav key={group.label} className=\"hb-ke8-group\" aria-label={group.label}>\n                <span className=\"hb-ke8-gl\" aria-hidden=\"true\">\n                  {group.label}\n                </span>\n                <ul className=\"hb-ke8-ul\">\n                  {group.links.map((link) => (\n                    <li key={link.label}>\n                      <a href={link.href} className=\"hb-ke8-a\">\n                        {link.label}\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </nav>\n            ))}\n          </div>\n          <button ref={btnRef} type=\"button\" className=\"hb-ke8-top\" onClick={backToTop} aria-label={backToTopLabel}>\n            <span className=\"hb-ke8-tl\" aria-hidden=\"true\">\n              {backToTopLabel}\n            </span>\n            <span className=\"hb-ke8-ar\" aria-hidden=\"true\">\n              <svg viewBox=\"0 0 16 16\">\n                <path d=\"M8 13V3M3.5 7.5 8 3l4.5 4.5\" />\n              </svg>\n              <svg viewBox=\"0 0 16 16\">\n                <path d=\"M8 13V3M3.5 7.5 8 3l4.5 4.5\" />\n              </svg>\n            </span>\n          </button>\n        </div>\n      </div>\n    </footer>\n  );\n}\n"
    }
  ]
}