{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "nav-sidebar-mobile",
  "type": "registry:component",
  "title": "Nav Sidebar Mobile",
  "description": "A mobile app bar whose animated hamburger opens a full-height drawer with grouped links, accordion sub-links, a search field and an account footer. Focus is trapped while open and Escape closes it.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "navigation",
    "mobile nav",
    "drawer",
    "hamburger",
    "accordion",
    "focus trap",
    "navigation"
  ],
  "docs": "https://hyperblur.dev/effects/nav-sidebar-mobile",
  "files": [
    {
      "path": "registry/hyperblur/nav-sidebar-mobile.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/nav-sidebar-mobile.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport type NavSidebarMobileIcon = \"inbox\" | \"folder\" | \"calendar\" | \"users\" | \"chart\" | \"gear\" | \"help\" | \"star\";\n\nexport interface NavSidebarMobileSubLink {\n  label: string;\n  href: string;\n}\n\nexport interface NavSidebarMobileLink {\n  label: string;\n  href?: string;\n  icon?: NavSidebarMobileIcon;\n  badge?: string;\n  children?: NavSidebarMobileSubLink[];\n}\n\nexport interface NavSidebarMobileGroup {\n  title: string;\n  links: NavSidebarMobileLink[];\n}\n\nexport interface NavSidebarMobileUser {\n  name: string;\n  role: string;\n}\n\nexport interface NavSidebarMobileProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  brand?: string;\n  groups?: NavSidebarMobileGroup[];\n  activeHref?: string;\n  user?: NavSidebarMobileUser | null;\n  cta?: { label: string; href: string } | null;\n  open?: boolean;\n  defaultOpen?: boolean;\n  onOpenChange?: (open: boolean) => void;\n  defaultExpanded?: string[];\n  accent?: string;\n  showBackdrop?: boolean;\n}\n\nconst css = `\n.hb-ke3 {\n  --hb-ke3-accent: #ff6b4a;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-ke3 *, .hb-ke3 *::before, .hb-ke3 *::after { box-sizing: border-box; }\n.hb-ke3[data-backdrop=\"true\"] {\n  display: flex;\n  justify-content: center;\n  padding: 28px 16px;\n  overflow: hidden;\n  background:\n    radial-gradient(50% 60% at 50% 40%, color-mix(in srgb, var(--hb-ke3-accent) 14%, transparent), transparent 70%),\n    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 22px 22px,\n    #0a0a0a;\n}\n.hb-ke3-phone {\n  position: relative;\n  z-index: 1;\n  width: 344px;\n  max-width: 100%;\n  height: 560px;\n  padding: 10px;\n  border-radius: 48px;\n  background: linear-gradient(145deg, #2a2a2d, #141416 40%, #1d1d20);\n  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.6);\n}\n.hb-ke3-screen {\n  position: relative;\n  height: 100%;\n  overflow: hidden;\n  border-radius: 38px;\n  background: #0b0b0c;\n  transform: translateZ(0);\n}\n.hb-ke3-notch { position: absolute; z-index: 40; top: 9px; left: 50%; width: 92px; height: 26px; border-radius: 999px; background: #000; transform: translateX(-50%); }\n.hb-ke3-status { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 28px; color: #ededed; font-size: 13px; font-weight: 600; }\n.hb-ke3-sig { display: inline-flex; gap: 2px; align-items: flex-end; }\n.hb-ke3-sig i { display: block; width: 3px; border-radius: 1px; background: #ededed; }\n.hb-ke3-bar {\n  position: relative;\n  z-index: 2;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  height: 56px;\n  padding: 0 10px;\n  border-bottom: 1px solid rgba(255,255,255,.08);\n  background: rgba(11,11,12,.9);\n  backdrop-filter: blur(12px);\n}\n.hb-ke3-ib {\n  display: grid;\n  place-items: center;\n  flex: none;\n  width: 40px;\n  height: 40px;\n  margin: 0;\n  padding: 0;\n  border: 0;\n  border-radius: 12px;\n  background: transparent;\n  color: #ededed;\n  cursor: pointer;\n  transition: background-color .18s ease;\n}\n.hb-ke3-ib:hover { background: rgba(255,255,255,.06); }\n.hb-ke3-ib svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }\n.hb-ke3-burger { position: relative; width: 18px; height: 12px; }\n.hb-ke3-burger i { position: absolute; left: 0; width: 100%; height: 1.8px; border-radius: 2px; background: currentColor; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s ease, width .3s ease; }\n.hb-ke3-burger i:nth-child(1) { top: 0; }\n.hb-ke3-burger i:nth-child(2) { top: 5px; width: 70%; }\n.hb-ke3-burger i:nth-child(3) { top: 10px; }\n.hb-ke3[data-open=\"true\"] .hb-ke3-burger i:nth-child(1) { transform: translateY(5px) rotate(45deg); }\n.hb-ke3[data-open=\"true\"] .hb-ke3-burger i:nth-child(2) { opacity: 0; width: 0; }\n.hb-ke3[data-open=\"true\"] .hb-ke3-burger i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }\n.hb-ke3-brand { display: inline-flex; align-items: center; gap: 8px; color: #ededed; font-size: 16px; font-weight: 650; letter-spacing: -.01em; text-decoration: none; }\n.hb-ke3-logo { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--hb-ke3-accent), color-mix(in srgb, var(--hb-ke3-accent) 40%, #7c3aed)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }\n.hb-ke3-sp { flex: 1; }\n.hb-ke3-page { padding: 20px 18px; }\n.hb-ke3-hi { margin: 0; color: #8f8f8f; font-size: 13px; }\n.hb-ke3-h { margin: 4px 0 16px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }\n.hb-ke3-card { margin-bottom: 10px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: #131315; }\n.hb-ke3-cl { height: 8px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.08); }\n.hb-ke3-ct { font-size: 14px; font-weight: 600; }\n.hb-ke3-cm { margin-top: 3px; color: #8f8f8f; font-size: 12px; }\n.hb-ke3-scrim {\n  position: fixed;\n  z-index: 20;\n  inset: 0;\n  background: rgba(0,0,0,.55);\n  backdrop-filter: blur(3px);\n  opacity: 0;\n  visibility: hidden;\n  transition: opacity .3s ease, visibility 0s linear .3s;\n}\n.hb-ke3[data-open=\"true\"] .hb-ke3-scrim { opacity: 1; visibility: visible; transition: opacity .3s ease; }\n.hb-ke3-drawer {\n  position: fixed;\n  z-index: 30;\n  top: 0;\n  bottom: 0;\n  left: 0;\n  display: flex;\n  flex-direction: column;\n  width: min(86%, 320px);\n  border-right: 1px solid rgba(255,255,255,.08);\n  background: linear-gradient(180deg, #141416, #0e0e0f);\n  box-shadow: 30px 0 80px -20px rgba(0,0,0,.8);\n  visibility: hidden;\n  transform: translate3d(-102%,0,0);\n  transition: transform .42s cubic-bezier(.2,.8,.2,1), visibility 0s linear .42s;\n}\n.hb-ke3[data-open=\"true\"] .hb-ke3-drawer { visibility: visible; transform: none; transition: transform .42s cubic-bezier(.2,.8,.2,1); }\n.hb-ke3[data-backdrop=\"true\"] .hb-ke3-drawer { padding-top: 44px; }\n.hb-ke3-dh { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 10px 0 18px; border-bottom: 1px solid rgba(255,255,255,.07); }\n.hb-ke3-search {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  height: 40px;\n  margin: 14px 14px 4px;\n  padding: 0 12px;\n  border: 1px solid rgba(255,255,255,.08);\n  border-radius: 12px;\n  background: #18181a;\n  color: #8f8f8f;\n}\n.hb-ke3-search svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }\n.hb-ke3-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #ededed; font: inherit; font-size: 14px; }\n.hb-ke3-search input::placeholder { color: #6f6f6f; }\n.hb-ke3-search:focus-within { border-color: color-mix(in srgb, var(--hb-ke3-accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-ke3-accent) 18%, transparent); }\n.hb-ke3-scroll { flex: 1; overflow-y: auto; padding: 6px 10px 12px; scrollbar-width: thin; }\n.hb-ke3-gt { margin: 16px 10px 6px; color: #6f6f6f; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }\n.hb-ke3-ul { margin: 0; padding: 0; list-style: none; }\n.hb-ke3-row {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 12px;\n  width: 100%;\n  height: 42px;\n  margin: 0;\n  padding: 0 10px;\n  border: 0;\n  border-radius: 12px;\n  background: transparent;\n  color: #cfcfcf;\n  font: inherit;\n  font-size: 14.5px;\n  font-weight: 500;\n  text-align: left;\n  text-decoration: none;\n  cursor: pointer;\n  transition: background-color .18s ease, color .18s ease;\n}\n.hb-ke3-row:hover { background: rgba(255,255,255,.05); color: #fff; }\n.hb-ke3-row[data-active=\"true\"] { color: #fff; background: rgba(255,255,255,.06); }\n.hb-ke3-row svg.hb-ke3-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: #8f8f8f; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }\n.hb-ke3-row[data-active=\"true\"] svg.hb-ke3-ic, .hb-ke3-row[aria-expanded=\"true\"] svg.hb-ke3-ic { stroke: var(--hb-ke3-accent); }\n.hb-ke3-badge { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: var(--hb-ke3-accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }\n.hb-ke3-chev { width: 14px; height: 14px; margin-left: auto; fill: none; stroke: #8f8f8f; stroke-width: 2; transition: transform .3s cubic-bezier(.2,.8,.2,1); }\n.hb-ke3-row[aria-expanded=\"true\"] .hb-ke3-chev { transform: rotate(90deg); }\n.hb-ke3-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.2,.8,.2,1); }\n.hb-ke3-sub[data-open=\"true\"] { grid-template-rows: 1fr; }\n.hb-ke3-subin { min-height: 0; overflow: hidden; }\n.hb-ke3-subul { position: relative; margin: 2px 0 6px 19px; padding: 0 0 0 12px; list-style: none; border-left: 1px solid rgba(255,255,255,.08); }\n.hb-ke3-sl {\n  position: relative;\n  display: flex;\n  align-items: center;\n  height: 36px;\n  padding: 0 10px;\n  border-radius: 10px;\n  color: #8f8f8f;\n  font-size: 13.5px;\n  text-decoration: none;\n  transition: color .15s ease, background-color .15s ease;\n}\n.hb-ke3-sl:hover { color: #ededed; background: rgba(255,255,255,.04); }\n.hb-ke3-sl[data-active=\"true\"] { color: #fff; }\n.hb-ke3-sl[data-active=\"true\"]::before { content: \"\"; position: absolute; left: -13px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--hb-ke3-accent); box-shadow: 0 0 10px var(--hb-ke3-accent); }\n.hb-ke3-foot { display: flex; align-items: center; gap: 10px; padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.07); }\n.hb-ke3-av { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #22d3ee, #6366f1); color: #fff; font-size: 12.5px; font-weight: 700; }\n.hb-ke3-un { font-size: 13.5px; font-weight: 600; }\n.hb-ke3-ur { color: #8f8f8f; font-size: 12px; }\n.hb-ke3-up { margin-left: auto; padding: 7px 12px; border-radius: 999px; background: #ededed; color: #0a0a0a; font-size: 12.5px; font-weight: 600; text-decoration: none; transition: background-color .15s ease; }\n.hb-ke3-up:hover { background: #fff; }\n.hb-ke3 a:focus-visible, .hb-ke3 button:focus-visible { outline: 2px solid var(--hb-ke3-accent); outline-offset: 2px; }\n.hb-ke3-note {\n  position: absolute;\n  z-index: 2;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  color: #a1a1a1;\n  font-size: 13px;\n  white-space: nowrap;\n}\n.hb-ke3-note b { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(20,20,22,.8); color: #ededed; font-weight: 550; }\n.hb-ke3-note i { display: block; width: 64px; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.25), transparent); }\n.hb-ke3-note[data-side=\"r\"] { flex-direction: row-reverse; }\n.hb-ke3-note[data-side=\"r\"] i { background: linear-gradient(270deg, rgba(255,255,255,.25), transparent); }\n.hb-ke3-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n@container (max-width: 900px) {\n  .hb-ke3-note { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ke3 *, .hb-ke3 *::before, .hb-ke3 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst icons: Record<NavSidebarMobileIcon, string[]> = {\n  inbox: [\"M3 13h5l1.5 3h5l1.5-3h5\", \"M5.5 5h13L21 13v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5l2.5-8z\"],\n  folder: [\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z\"],\n  calendar: [\"M4 6h16v14H4z\", \"M4 10h16M9 3v4M15 3v4\"],\n  users: [\n    \"M16 20v-1.5a3.5 3.5 0 0 0-3.5-3.5h-4A3.5 3.5 0 0 0 5 18.5V20\",\n    \"M10.5 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6z\",\n    \"M19 20v-1.5a3.5 3.5 0 0 0-2.5-3.3\",\n  ],\n  chart: [\"M4 20V10M10 20V4M16 20v-7M21 20H3\"],\n  gear: [\n    \"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z\",\n    \"M19 12a7 7 0 0 0-.1-1.2l2-1.6-2-3.4-2.4.9a7 7 0 0 0-2-1.2L14 3h-4l-.5 2.5a7 7 0 0 0-2 1.2l-2.4-.9-2 3.4 2 1.6a7 7 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-.9a7 7 0 0 0 2 1.2L10 21h4l.5-2.5a7 7 0 0 0 2-1.2l2.4.9 2-3.4-2-1.6c.1-.4.1-.8.1-1.2z\",\n  ],\n  help: [\"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z\", \"M9.5 9.5a2.5 2.5 0 0 1 4.8 1c0 1.7-2.3 2-2.3 3.5M12 17h.01\"],\n  star: [\"m12 3 2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1L3.2 9.5l6.1-.9L12 3z\"],\n};\n\nfunction Glyph({ name }: { name: NavSidebarMobileIcon }) {\n  return (\n    <svg className=\"hb-ke3-ic\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n      {icons[name].map((d) => (\n        <path key={d} d={d} />\n      ))}\n    </svg>\n  );\n}\n\nconst defaultGroups: NavSidebarMobileGroup[] = [\n  {\n    title: \"Workspace\",\n    links: [\n      { label: \"Inbox\", href: \"#inbox\", icon: \"inbox\", badge: \"12\" },\n      {\n        label: \"Projects\",\n        icon: \"folder\",\n        children: [\n          { label: \"Website relaunch\", href: \"#relaunch\" },\n          { label: \"Mobile app 3.0\", href: \"#mobile\" },\n          { label: \"Q1 brand refresh\", href: \"#brand\" },\n        ],\n      },\n      { label: \"Calendar\", href: \"#calendar\", icon: \"calendar\" },\n    ],\n  },\n  {\n    title: \"Team\",\n    links: [\n      { label: \"Members\", href: \"#members\", icon: \"users\" },\n      {\n        label: \"Reports\",\n        icon: \"chart\",\n        children: [\n          { label: \"Weekly digest\", href: \"#weekly\" },\n          { label: \"Velocity\", href: \"#velocity\" },\n        ],\n      },\n      { label: \"Favorites\", href: \"#favorites\", icon: \"star\" },\n    ],\n  },\n  {\n    title: \"Account\",\n    links: [\n      { label: \"Settings\", href: \"#settings\", icon: \"gear\" },\n      { label: \"Help center\", href: \"#help\", icon: \"help\" },\n    ],\n  },\n];\n\nconst focusable = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nexport function NavSidebarMobile({\n  brand = \"Harbor\",\n  groups = defaultGroups,\n  activeHref = \"#relaunch\",\n  user = { name: \"Iris Calder\", role: \"Design lead\" },\n  cta = { label: \"Upgrade\", href: \"#\" },\n  open,\n  defaultOpen = false,\n  onOpenChange,\n  defaultExpanded = [\"Projects\"],\n  accent = \"#ff6b4a\",\n  showBackdrop = true,\n  className = \"\",\n  style,\n  ...rest\n}: NavSidebarMobileProps) {\n  const uid = React.useId();\n  const [inner, setInner] = React.useState(defaultOpen);\n  const isOpen = open ?? inner;\n  const [expanded, setExpanded] = React.useState<string[]>(defaultExpanded);\n  const drawerRef = React.useRef<HTMLDivElement>(null);\n  const burgerRef = React.useRef<HTMLButtonElement>(null);\n  const opened = React.useRef(false);\n\n  const setOpen = React.useCallback(\n    (next: boolean) => {\n      if (open === undefined) setInner(next);\n      onOpenChange?.(next);\n    },\n    [open, onOpenChange],\n  );\n\n  React.useEffect(() => {\n    if (!isOpen || !opened.current) return;\n    opened.current = false;\n    const id = window.requestAnimationFrame(() => {\n      drawerRef.current?.querySelector<HTMLElement>(focusable)?.focus();\n    });\n    return () => window.cancelAnimationFrame(id);\n  }, [isOpen]);\n\n  function toggle() {\n    if (!isOpen) opened.current = true;\n    setOpen(!isOpen);\n  }\n\n  function close() {\n    setOpen(false);\n    burgerRef.current?.focus();\n  }\n\n  function onDrawerKey(e: React.KeyboardEvent) {\n    if (e.key === \"Escape\") {\n      e.preventDefault();\n      close();\n      return;\n    }\n    if (e.key !== \"Tab\" || !drawerRef.current) return;\n    const nodes = Array.from(drawerRef.current.querySelectorAll<HTMLElement>(focusable)).filter((n) => n.offsetParent !== null);\n    if (!nodes.length) return;\n    const first = nodes[0]!;\n    const last = nodes[nodes.length - 1]!;\n    if (e.shiftKey && document.activeElement === first) {\n      e.preventDefault();\n      last.focus();\n    } else if (!e.shiftKey && document.activeElement === last) {\n      e.preventDefault();\n      first.focus();\n    }\n  }\n\n  function flip(label: string) {\n    setExpanded((list) => (list.includes(label) ? list.filter((l) => l !== label) : [...list, label]));\n  }\n\n  const nav = (\n    <>\n      <div className=\"hb-ke3-bar\">\n        <button\n          ref={burgerRef}\n          type=\"button\"\n          className=\"hb-ke3-ib\"\n          aria-label={isOpen ? \"Close menu\" : \"Open menu\"}\n          aria-expanded={isOpen}\n          aria-controls={`${uid}-drawer`}\n          onClick={toggle}\n        >\n          <span className=\"hb-ke3-burger\" aria-hidden=\"true\">\n            <i />\n            <i />\n            <i />\n          </span>\n        </button>\n        <a href=\"#\" className=\"hb-ke3-brand\">\n          <span className=\"hb-ke3-logo\" aria-hidden=\"true\" />\n          {brand}\n        </a>\n        <span className=\"hb-ke3-sp\" />\n        <button type=\"button\" className=\"hb-ke3-ib\" aria-label=\"Notifications\">\n          <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n            <path d=\"M6 16V11a6 6 0 1 1 12 0v5l1.5 2h-15L6 16zM10 20.5a2 2 0 0 0 4 0\" />\n          </svg>\n        </button>\n      </div>\n      <div className=\"hb-ke3-scrim\" aria-hidden=\"true\" onClick={close} />\n      <div\n        ref={drawerRef}\n        id={`${uid}-drawer`}\n        className=\"hb-ke3-drawer\"\n        role=\"dialog\"\n        aria-modal={isOpen ? \"true\" : undefined}\n        aria-label=\"Navigation\"\n        onKeyDown={onDrawerKey}\n      >\n        <div className=\"hb-ke3-dh\">\n          <span className=\"hb-ke3-brand\">\n            <span className=\"hb-ke3-logo\" aria-hidden=\"true\" />\n            {brand}\n          </span>\n          <span className=\"hb-ke3-sp\" />\n          <button type=\"button\" className=\"hb-ke3-ib\" aria-label=\"Close menu\" onClick={close}>\n            <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n              <path d=\"M6 6l12 12M18 6 6 18\" />\n            </svg>\n          </button>\n        </div>\n        <label className=\"hb-ke3-search\">\n          <svg viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n            <circle cx=\"7\" cy=\"7\" r=\"4.5\" />\n            <path d=\"m10.5 10.5 3 3\" />\n          </svg>\n          <span className=\"hb-ke3-sr\">Search</span>\n          <input type=\"search\" placeholder=\"Jump to...\" />\n        </label>\n        <div className=\"hb-ke3-scroll\">\n          {groups.map((group) => (\n            <div key={group.title}>\n              <p className=\"hb-ke3-gt\" id={`${uid}-${group.title}`}>\n                {group.title}\n              </p>\n              <ul className=\"hb-ke3-ul\" aria-labelledby={`${uid}-${group.title}`}>\n                {group.links.map((link) => {\n                  if (link.children && link.children.length) {\n                    const on = expanded.includes(link.label);\n                    const subId = `${uid}-${group.title}-${link.label}`.replace(/\\s+/g, \"-\");\n                    return (\n                      <li key={link.label}>\n                        <button\n                          type=\"button\"\n                          className=\"hb-ke3-row\"\n                          aria-expanded={on}\n                          aria-controls={subId}\n                          onClick={() => flip(link.label)}\n                        >\n                          {link.icon && <Glyph name={link.icon} />}\n                          {link.label}\n                          <svg className=\"hb-ke3-chev\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n                            <path d=\"m6 4 4 4-4 4\" />\n                          </svg>\n                        </button>\n                        <div id={subId} className=\"hb-ke3-sub\" data-open={on ? \"true\" : \"false\"}>\n                          <div className=\"hb-ke3-subin\" inert={!on}>\n                            <ul className=\"hb-ke3-subul\">\n                              {link.children.map((sub) => (\n                                <li key={sub.label}>\n                                  <a\n                                    href={sub.href}\n                                    className=\"hb-ke3-sl\"\n                                    data-active={sub.href === activeHref ? \"true\" : \"false\"}\n                                    aria-current={sub.href === activeHref ? \"page\" : undefined}\n                                    onClick={() => setOpen(false)}\n                                  >\n                                    {sub.label}\n                                  </a>\n                                </li>\n                              ))}\n                            </ul>\n                          </div>\n                        </div>\n                      </li>\n                    );\n                  }\n                  return (\n                    <li key={link.label}>\n                      <a\n                        href={link.href ?? \"#\"}\n                        className=\"hb-ke3-row\"\n                        data-active={link.href === activeHref ? \"true\" : \"false\"}\n                        aria-current={link.href === activeHref ? \"page\" : undefined}\n                        onClick={() => setOpen(false)}\n                      >\n                        {link.icon && <Glyph name={link.icon} />}\n                        {link.label}\n                        {link.badge && <span className=\"hb-ke3-badge\">{link.badge}</span>}\n                      </a>\n                    </li>\n                  );\n                })}\n              </ul>\n            </div>\n          ))}\n        </div>\n        {user && (\n          <div className=\"hb-ke3-foot\">\n            <span className=\"hb-ke3-av\" aria-hidden=\"true\">\n              {user.name\n                .split(/\\s+/)\n                .slice(0, 2)\n                .map((p) => p.charAt(0).toUpperCase())\n                .join(\"\")}\n            </span>\n            <div>\n              <div className=\"hb-ke3-un\">{user.name}</div>\n              <div className=\"hb-ke3-ur\">{user.role}</div>\n            </div>\n            {cta && (\n              <a href={cta.href} className=\"hb-ke3-up\">\n                {cta.label}\n              </a>\n            )}\n          </div>\n        )}\n      </div>\n    </>\n  );\n\n  return (\n    <div\n      className={`hb-ke3 ${className}`}\n      data-open={isOpen ? \"true\" : \"false\"}\n      data-backdrop={showBackdrop ? \"true\" : \"false\"}\n      style={{ \"--hb-ke3-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-nav-sidebar-mobile\" precedence=\"default\">\n        {css}\n      </style>\n      {showBackdrop ? (\n        <>\n          <span className=\"hb-ke3-note\" style={{ left: \"calc(50% - 400px)\", top: \"150px\" }} aria-hidden=\"true\">\n            <b>Grouped links</b>\n            <i />\n          </span>\n          <span className=\"hb-ke3-note\" style={{ left: \"calc(50% - 404px)\", top: \"300px\" }} aria-hidden=\"true\">\n            <b>Accordion sub-links</b>\n            <i />\n          </span>\n          <span className=\"hb-ke3-note\" data-side=\"r\" style={{ right: \"calc(50% - 392px)\", top: \"120px\" }} aria-hidden=\"true\">\n            <b>Esc to close</b>\n            <i />\n          </span>\n          <span className=\"hb-ke3-note\" data-side=\"r\" style={{ right: \"calc(50% - 400px)\", top: \"380px\" }} aria-hidden=\"true\">\n            <b>Focus stays inside</b>\n            <i />\n          </span>\n          <div className=\"hb-ke3-phone\">\n            <div className=\"hb-ke3-screen\">\n              <span className=\"hb-ke3-notch\" aria-hidden=\"true\" />\n              <div className=\"hb-ke3-status\" aria-hidden=\"true\">\n                <span>9:41</span>\n                <span className=\"hb-ke3-sig\">\n                  <i style={{ height: 4 }} />\n                  <i style={{ height: 6 }} />\n                  <i style={{ height: 8 }} />\n                  <i style={{ height: 10 }} />\n                </span>\n              </div>\n              {nav}\n              <div className=\"hb-ke3-page\" aria-hidden=\"true\">\n                <p className=\"hb-ke3-hi\">Tuesday, 4 November</p>\n                <p className=\"hb-ke3-h\">Good morning, Iris</p>\n                <div className=\"hb-ke3-card\">\n                  <div className=\"hb-ke3-ct\">Homepage hero review</div>\n                  <div className=\"hb-ke3-cm\">Due today, 3 comments</div>\n                  <div className=\"hb-ke3-cl\" style={{ width: \"82%\" }} />\n                </div>\n                <div className=\"hb-ke3-card\">\n                  <div className=\"hb-ke3-ct\">App store screenshots</div>\n                  <div className=\"hb-ke3-cm\">Thursday, assigned to Omar</div>\n                  <div className=\"hb-ke3-cl\" style={{ width: \"56%\" }} />\n                </div>\n                <div className=\"hb-ke3-card\">\n                  <div className=\"hb-ke3-ct\">Brand color audit</div>\n                  <div className=\"hb-ke3-cm\">Next week</div>\n                  <div className=\"hb-ke3-cl\" style={{ width: \"30%\" }} />\n                </div>\n              </div>\n            </div>\n          </div>\n        </>\n      ) : (\n        nav\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}