{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navbar-bottom-notch",
  "type": "registry:component",
  "title": "Navbar Bottom Notch",
  "description": "A mobile bottom bar with a notch cut into the plate that slides to the selected tab, where the icon pops up into a floating accent bubble. Badges, a dot state, arrow keys and safe-area spacing are built in.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "navigation",
    "bottom bar",
    "mobile",
    "tab bar",
    "notch",
    "app",
    "navigation"
  ],
  "docs": "https://hyperblur.dev/effects/navbar-bottom-notch",
  "files": [
    {
      "path": "registry/hyperblur/navbar-bottom-notch.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/navbar-bottom-notch.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type NavbarBottomNotchIcon = \"home\" | \"explore\" | \"inbox\" | \"saved\" | \"profile\" | \"cart\" | \"calendar\" | \"chart\";\n\nexport interface NavbarBottomNotchTab {\n  label: string;\n  href?: string;\n  icon?: NavbarBottomNotchIcon | React.ReactNode;\n  badge?: number | boolean;\n}\n\nexport interface NavbarBottomNotchProps extends Omit<React.HTMLAttributes<HTMLElement>, \"children\" | \"onChange\"> {\n  tabs?: NavbarBottomNotchTab[];\n  value?: number;\n  defaultValue?: number;\n  onValueChange?: (index: number) => void;\n  fixed?: boolean;\n  accent?: string;\n  showBackdrop?: boolean;\n}\n\nconst defaultTabs: NavbarBottomNotchTab[] = [\n  { label: \"Home\", icon: \"home\", href: \"#home\" },\n  { label: \"Explore\", icon: \"explore\", href: \"#explore\" },\n  { label: \"Inbox\", icon: \"inbox\", href: \"#inbox\", badge: 3 },\n  { label: \"Saved\", icon: \"saved\", href: \"#saved\" },\n  { label: \"Profile\", icon: \"profile\", href: \"#profile\", badge: true },\n];\n\nconst ease = \"cubic-bezier(.34,1.36,.5,1)\";\n\nconst css = `\n@property --hb-xj5-x { syntax: \"<percentage>\"; inherits: true; initial-value: 50%; }\n.hb-xj5 {\n  --hb-xj5-accent: #34d399;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-xj5 *, .hb-xj5 *::before, .hb-xj5 *::after { box-sizing: border-box; }\n.hb-xj5[data-backdrop=\"true\"] {\n  display: grid;\n  place-items: center;\n  min-height: 600px;\n  padding: 20px;\n  overflow: hidden;\n  background: radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--hb-xj5-accent) 14%, transparent), transparent 70%), #0a0a0a;\n}\n.hb-xj5-phone {\n  position: relative;\n  width: 320px;\n  height: 560px;\n  padding: 10px;\n  border-radius: 46px;\n  background: linear-gradient(160deg, #2a2a2c, #111113 40%, #1d1d1f);\n  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px #000;\n}\n.hb-xj5-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: #0c0c0d; }\n.hb-xj5-island { position: absolute; top: 10px; left: 50%; z-index: 6; width: 92px; height: 26px; border-radius: 999px; background: #000; transform: translateX(-50%); }\n.hb-xj5-app { position: absolute; inset: 0; padding: 48px 18px 120px; overflow: hidden; }\n.hb-xj5-view { animation: hb-xj5-in .45s cubic-bezier(.22,1,.36,1); }\n@keyframes hb-xj5-in { from { opacity: 0; transform: translateY(10px); } }\n.hb-xj5-hi { color: #8f8f8f; font-size: 12px; }\n.hb-xj5-title { margin: 2px 0 14px; font-size: 26px; font-weight: 650; letter-spacing: -.035em; }\n.hb-xj5-feat { height: 150px; border-radius: 22px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }\n.hb-xj5-feat b { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }\n.hb-xj5-feat small { color: rgba(255,255,255,.7); font-size: 12px; margin-top: 2px; }\n.hb-xj5-rows { display: grid; gap: 10px; margin-top: 14px; }\n.hb-xj5-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #151517; }\n.hb-xj5-row i { width: 38px; height: 38px; flex: none; border-radius: 12px; font-style: normal; }\n.hb-xj5-row span { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; }\n.hb-xj5-row span small { display: block; color: #7a7a7a; font-size: 11.5px; font-weight: 400; margin-top: 1px; }\n.hb-xj5-row em { color: #7a7a7a; font-size: 11px; font-style: normal; }\n.hb-xj5-nav {\n  position: relative;\n  z-index: 5;\n  width: 100%;\n  max-width: 440px;\n  margin: 0 auto;\n  height: 74px;\n}\n.hb-xj5[data-backdrop=\"false\"][data-fixed=\"true\"] .hb-xj5-nav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; }\n.hb-xj5[data-backdrop=\"true\"] .hb-xj5-nav { position: absolute; left: 10px; right: 10px; bottom: 14px; width: auto; }\n.hb-xj5-plate {\n  position: absolute;\n  inset: 0;\n  border-radius: 26px;\n  background: linear-gradient(180deg, #1c1c1f, #141416);\n  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 0 0 1px rgba(255,255,255,.05);\n  -webkit-mask: radial-gradient(circle at var(--hb-xj5-x) 0, transparent 34px, #000 35px);\n  mask: radial-gradient(circle at var(--hb-xj5-x) 0, transparent 34px, #000 35px);\n  transition: --hb-xj5-x .6s ${ease};\n}\n.hb-xj5-shadow {\n  position: absolute;\n  inset: 8px 6px -6px;\n  border-radius: 26px;\n  background: rgba(0,0,0,.6);\n  filter: blur(14px);\n}\n.hb-xj5-bubble {\n  position: absolute;\n  top: -27px;\n  left: var(--hb-xj5-x);\n  width: 54px;\n  height: 54px;\n  border-radius: 50%;\n  display: grid;\n  place-items: center;\n  color: #06120d;\n  background: radial-gradient(circle at 35% 25%, color-mix(in srgb, var(--hb-xj5-accent) 60%, #fff), var(--hb-xj5-accent) 60%);\n  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.5), 0 10px 24px -6px color-mix(in srgb, var(--hb-xj5-accent) 70%, transparent);\n  transform: translateX(-50%);\n  transition: --hb-xj5-x .6s ${ease};\n  pointer-events: none;\n}\n.hb-xj5-bubble svg { width: 22px; height: 22px; animation: hb-xj5-pop .55s ${ease}; }\n@keyframes hb-xj5-pop { 0% { transform: scale(.4) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }\n.hb-xj5-list { position: relative; display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }\n.hb-xj5-list li { flex: 1; display: flex; }\n.hb-xj5-tab {\n  position: relative;\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  gap: 4px;\n  border: 0;\n  background: none;\n  color: #7c7c80;\n  font: inherit;\n  text-decoration: none;\n  cursor: pointer;\n  -webkit-tap-highlight-color: transparent;\n  transition: color .2s ease;\n}\n.hb-xj5-tab:hover { color: #d4d4d4; }\n.hb-xj5-tab svg { width: 22px; height: 22px; transition: transform .45s ${ease}, opacity .2s ease; }\n.hb-xj5-tab[aria-current=\"page\"] svg { opacity: 0; transform: translateY(-22px) scale(.6); }\n.hb-xj5-lbl { font-size: 11px; font-weight: 500; letter-spacing: .01em; transition: transform .45s ${ease}, color .2s ease; }\n.hb-xj5-tab[aria-current=\"page\"] .hb-xj5-lbl { color: #ededed; transform: translateY(10px); font-weight: 600; }\n.hb-xj5-badge {\n  position: absolute;\n  top: 13px;\n  left: calc(50% + 6px);\n  min-width: 16px;\n  height: 16px;\n  padding: 0 4px;\n  border-radius: 999px;\n  background: #ff4d4f;\n  color: #fff;\n  font-size: 10px;\n  font-weight: 700;\n  line-height: 16px;\n  text-align: center;\n  box-shadow: 0 0 0 2px #18181a;\n  transition: opacity .2s ease, transform .3s ${ease};\n}\n.hb-xj5-badge[data-dot=\"true\"] { min-width: 8px; width: 8px; height: 8px; padding: 0; top: 16px; left: calc(50% + 7px); }\n.hb-xj5-tab[aria-current=\"page\"] .hb-xj5-badge { opacity: 0; transform: scale(.4); }\n.hb-xj5-tab:focus-visible { outline: none; }\n.hb-xj5-tab:focus-visible .hb-xj5-lbl { outline: 2px solid var(--hb-xj5-accent); outline-offset: 3px; border-radius: 4px; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xj5 *, .hb-xj5 *::before, .hb-xj5 *::after { transition: none !important; animation: none !important; }\n}\n`;\n\nconst paths: Record<NavbarBottomNotchIcon, React.ReactNode> = {\n  home: <path d=\"M4 10.5 12 4l8 6.5V19a1 1 0 0 1-1 1h-4.5v-5.5h-5V20H5a1 1 0 0 1-1-1z\" />,\n  explore: (\n    <>\n      <circle cx=\"12\" cy=\"12\" r=\"8\" />\n      <path d=\"m15.2 8.8-1.9 4.5-4.5 1.9 1.9-4.5z\" />\n    </>\n  ),\n  inbox: (\n    <>\n      <path d=\"M4 13.5 6.3 6a1.5 1.5 0 0 1 1.4-1h8.6a1.5 1.5 0 0 1 1.4 1L20 13.5V18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1z\" />\n      <path d=\"M4 13.5h4.5l1 2h5l1-2H20\" />\n    </>\n  ),\n  saved: <path d=\"M7 4h10a1 1 0 0 1 1 1v15l-6-3.8L6 20V5a1 1 0 0 1 1-1Z\" />,\n  profile: (\n    <>\n      <circle cx=\"12\" cy=\"8.5\" r=\"3.5\" />\n      <path d=\"M5 19.5c1.2-3.3 3.8-5 7-5s5.8 1.7 7 5\" />\n    </>\n  ),\n  cart: (\n    <>\n      <path d=\"M3.5 4.5h2.2l2 10.5h10l1.8-7.5H7\" />\n      <circle cx=\"9.5\" cy=\"19\" r=\"1.3\" />\n      <circle cx=\"16.5\" cy=\"19\" r=\"1.3\" />\n    </>\n  ),\n  calendar: (\n    <>\n      <rect x=\"4\" y=\"5.5\" width=\"16\" height=\"14\" rx=\"2\" />\n      <path d=\"M4 10h16M8.5 3.5v4M15.5 3.5v4\" />\n    </>\n  ),\n  chart: <path d=\"M5 19V11M10 19V6M15 19v-5M20 19V9\" />,\n};\n\nfunction Icon({ icon }: { icon: NavbarBottomNotchTab[\"icon\"] }) {\n  if (typeof icon === \"string\" && icon in paths) {\n    return (\n      <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n        {paths[icon as NavbarBottomNotchIcon]}\n      </svg>\n    );\n  }\n  return <>{icon}</>;\n}\n\nconst views = [\n  { hi: \"Good morning, Noa\", title: \"Today\", feat: [\"Morning run club\", \"6:30 · Riverside loop · 18 going\"], grad: \"linear-gradient(135deg, #059669, #0ea5e9)\" },\n  { hi: \"Near you\", title: \"Explore\", feat: [\"Ceramics weekend\", \"Sat & Sun · Studio Kiln\"], grad: \"linear-gradient(135deg, #7c3aed, #db2777)\" },\n  { hi: \"3 unread\", title: \"Inbox\", feat: [\"Jules invited you\", \"Climbing night, Thursday 8pm\"], grad: \"linear-gradient(135deg, #f59e0b, #ef4444)\" },\n  { hi: \"12 items\", title: \"Saved\", feat: [\"Jazz on the roof\", \"Fri · 9pm · Hotel Lumen\"], grad: \"linear-gradient(135deg, #2563eb, #22d3ee)\" },\n  { hi: \"Member since 2024\", title: \"Profile\", feat: [\"42 events joined\", \"Top 5% in your city\"], grad: \"linear-gradient(135deg, #334155, #64748b)\" },\n];\n\nconst rows = [\n  [\"Pottery basics\", \"Tomorrow · 4 spots left\", \"linear-gradient(135deg,#fb923c,#f43f5e)\", \"2h\"],\n  [\"Sunset swim\", \"Fri · Praia Norte\", \"linear-gradient(135deg,#38bdf8,#6366f1)\", \"5h\"],\n];\n\nexport function NavbarBottomNotch({\n  tabs = defaultTabs,\n  value,\n  defaultValue = 0,\n  onValueChange,\n  fixed = true,\n  accent = \"#34d399\",\n  showBackdrop = true,\n  className,\n  style,\n  ...rest\n}: NavbarBottomNotchProps) {\n  const [inner, setInner] = React.useState(defaultValue);\n  const current = Math.min(value ?? inner, tabs.length - 1);\n  const refs = React.useRef<(HTMLElement | null)[]>([]);\n  const x = `${(((current + 0.5) / tabs.length) * 100).toFixed(3)}%`;\n\n  const select = (i: number) => {\n    if (value === undefined) setInner(i);\n    onValueChange?.(i);\n  };\n\n  const onKey = (e: React.KeyboardEvent, i: number) => {\n    let next = -1;\n    if (e.key === \"ArrowRight\") next = (i + 1) % tabs.length;\n    else if (e.key === \"ArrowLeft\") next = (i - 1 + tabs.length) % tabs.length;\n    if (next < 0) return;\n    e.preventDefault();\n    refs.current[next]?.focus();\n  };\n\n  const nav = (\n    <nav className=\"hb-xj5-nav\" aria-label=\"Primary\" style={{ \"--hb-xj5-x\": x } as React.CSSProperties}>\n      <div className=\"hb-xj5-shadow\" aria-hidden=\"true\" />\n      <div className=\"hb-xj5-plate\" aria-hidden=\"true\" />\n      <div className=\"hb-xj5-bubble\" aria-hidden=\"true\">\n        <Icon key={current} icon={tabs[current]?.icon} />\n      </div>\n      <ul className=\"hb-xj5-list\">\n        {tabs.map((t, i) => {\n          const content = (\n            <>\n              <Icon icon={t.icon} />\n              <span className=\"hb-xj5-lbl\">{t.label}</span>\n              {t.badge ? (\n                <span className=\"hb-xj5-badge\" data-dot={t.badge === true ? \"true\" : \"false\"} aria-label={t.badge === true ? \"New activity\" : `${t.badge} new`}>\n                  {t.badge === true ? \"\" : t.badge}\n                </span>\n              ) : null}\n            </>\n          );\n          return (\n            <li key={t.label + i}>\n              {t.href ? (\n                <a\n                  ref={(el) => {\n                    refs.current[i] = el;\n                  }}\n                  className=\"hb-xj5-tab\"\n                  href={t.href}\n                  aria-current={i === current ? \"page\" : undefined}\n                  onClick={(e) => {\n                    if (showBackdrop) e.preventDefault();\n                    select(i);\n                  }}\n                  onKeyDown={(e) => onKey(e, i)}\n                >\n                  {content}\n                </a>\n              ) : (\n                <button\n                  ref={(el) => {\n                    refs.current[i] = el;\n                  }}\n                  type=\"button\"\n                  className=\"hb-xj5-tab\"\n                  aria-current={i === current ? \"page\" : undefined}\n                  onClick={() => select(i)}\n                  onKeyDown={(e) => onKey(e, i)}\n                >\n                  {content}\n                </button>\n              )}\n            </li>\n          );\n        })}\n      </ul>\n    </nav>\n  );\n\n  const view = views[current % views.length];\n\n  return (\n    <div\n      className={[\"hb-xj5\", className].filter(Boolean).join(\" \")}\n      data-backdrop={showBackdrop ? \"true\" : \"false\"}\n      data-fixed={fixed ? \"true\" : \"false\"}\n      style={{ \"--hb-xj5-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-navbar-bottom-notch\" precedence=\"default\">\n        {css}\n      </style>\n      {showBackdrop ? (\n        <div className=\"hb-xj5-phone\">\n          <div className=\"hb-xj5-screen\">\n            <div className=\"hb-xj5-island\" aria-hidden=\"true\" />\n            <div className=\"hb-xj5-app\" aria-hidden=\"true\">\n              <div className=\"hb-xj5-view\" key={current}>\n                <div className=\"hb-xj5-hi\">{view.hi}</div>\n                <div className=\"hb-xj5-title\">{tabs[current]?.label ?? view.title}</div>\n                <div className=\"hb-xj5-feat\" style={{ background: view.grad }}>\n                  <b>{view.feat[0]}</b>\n                  <small>{view.feat[1]}</small>\n                </div>\n                <div className=\"hb-xj5-rows\">\n                  {rows.map((r) => (\n                    <div className=\"hb-xj5-row\" key={r[0]}>\n                      <i style={{ background: r[2] }} />\n                      <span>\n                        {r[0]}\n                        <small>{r[1]}</small>\n                      </span>\n                      <em>{r[3]}</em>\n                    </div>\n                  ))}\n                </div>\n              </div>\n            </div>\n            {nav}\n          </div>\n        </div>\n      ) : (\n        nav\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}