{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sidebar-glass-aurora",
  "type": "registry:component",
  "title": "Sidebar Glass Aurora",
  "description": "A frosted glass sidebar floating over slowly drifting aurora light, with a soft light that follows the pointer down the list. The active row is a raised glass pill with a bright top edge.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "sidebars",
    "sidebar",
    "glass",
    "gradient",
    "aurora",
    "frosted",
    "creative"
  ],
  "docs": "https://hyperblur.dev/effects/sidebar-glass-aurora",
  "files": [
    {
      "path": "registry/hyperblur/sidebar-glass-aurora.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/sidebar-glass-aurora.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nconst PATHS = {\n  spark: \"M10 2.8l1.6 4.6 4.6 1.6-4.6 1.6L10 15.2l-1.6-4.6L3.8 9l4.6-1.6zM15.5 13.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z\",\n  grid: \"M3.5 3.5h5v5h-5zM11.5 3.5h5v5h-5zM3.5 11.5h5v5h-5zM11.5 11.5h5v5h-5z\",\n  layers: \"M10 3l7 3.8-7 3.8-7-3.8zM3 10.2l7 3.8 7-3.8M3 13.6l7 3.8 7-3.8\",\n  image: \"M4 4h12a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zM3 13l4-4 3 3 2-2 5 5M12.5 7.5a.5.5 0 1 0 0-.1\",\n  users: \"M7.5 9a2.7 2.7 0 1 0 0-5.4 2.7 2.7 0 0 0 0 5.4zM2.5 16.2c.4-2.7 2.5-4.2 5-4.2s4.6 1.5 5 4.2M13 4.2a2.7 2.7 0 0 1 0 5M14.5 12.2c1.6.5 2.7 1.8 3 4\",\n  gear: \"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM10 2.8v2M10 15.2v2M17.2 10h-2M4.8 10h-2M15.1 4.9l-1.4 1.4M6.3 13.7l-1.4 1.4M15.1 15.1l-1.4-1.4M6.3 6.3L4.9 4.9\",\n} as const;\n\nexport type SidebarGlassAuroraIconName = keyof typeof PATHS;\n\nexport interface SidebarGlassAuroraItem {\n  id: string;\n  label: string;\n  icon?: SidebarGlassAuroraIconName | React.ReactNode;\n  badge?: string;\n}\n\nexport interface SidebarGlassAuroraProps\n  extends Omit<React.HTMLAttributes<HTMLElement>, \"onChange\" | \"children\" | \"defaultValue\"> {\n  items?: SidebarGlassAuroraItem[];\n  active?: string;\n  defaultActive?: string;\n  onChange?: (id: string) => void;\n  colors?: [string, string, string];\n  workspace?: string;\n  plan?: string;\n  usage?: { label: string; used: number; total: number } | null;\n  onUpgrade?: () => void;\n  upgradeLabel?: string;\n  speed?: number;\n}\n\nconst defaultItems: SidebarGlassAuroraItem[] = [\n  { id: \"create\", label: \"Create\", icon: \"spark\" },\n  { id: \"gallery\", label: \"Gallery\", icon: \"grid\", badge: \"128\" },\n  { id: \"styles\", label: \"Styles\", icon: \"layers\" },\n  { id: \"assets\", label: \"Assets\", icon: \"image\" },\n  { id: \"team\", label: \"Team\", icon: \"users\" },\n  { id: \"settings\", label: \"Settings\", icon: \"gear\" },\n];\n\nconst css = `\n.hb-xk5 {\n  --hb-xk5-c1: #6d5dfc;\n  --hb-xk5-c2: #2fd3c5;\n  --hb-xk5-c3: #ff4d8d;\n  --hb-xk5-sp: 18s;\n  --hb-xk5-my: -200px;\n  position: relative;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  padding: 10px;\n  overflow: hidden;\n  background: #08080b;\n  color: #f2f2f5;\n  font-family: inherit;\n  font-size: 13px;\n  line-height: 18px;\n  isolation: isolate;\n}\n.hb-xk5 *, .hb-xk5 *::before, .hb-xk5 *::after { box-sizing: border-box; }\n.hb-xk5-sky { position: absolute; inset: -30%; z-index: -2; filter: blur(34px) saturate(140%); opacity: .85; }\n.hb-xk5-blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; }\n.hb-xk5-blob:nth-child(1) { top: 8%; left: -10%; width: 80%; height: 46%; background: radial-gradient(closest-side, var(--hb-xk5-c1), transparent); animation: hb-xk5-a var(--hb-xk5-sp) ease-in-out infinite alternate; }\n.hb-xk5-blob:nth-child(2) { top: 42%; left: 30%; width: 70%; height: 40%; background: radial-gradient(closest-side, var(--hb-xk5-c2), transparent); animation: hb-xk5-b calc(var(--hb-xk5-sp) * 1.3) ease-in-out infinite alternate; }\n.hb-xk5-blob:nth-child(3) { top: 70%; left: -5%; width: 60%; height: 38%; background: radial-gradient(closest-side, var(--hb-xk5-c3), transparent); animation: hb-xk5-c calc(var(--hb-xk5-sp) * .9) ease-in-out infinite alternate; }\n.hb-xk5-glass {\n  position: absolute;\n  inset: 0;\n  z-index: -1;\n  background:\n    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 40%, rgba(0, 0, 0, .25)),\n    rgba(10, 10, 14, .42);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset -1px 0 0 rgba(255, 255, 255, .06);\n  backdrop-filter: blur(6px);\n  -webkit-backdrop-filter: blur(6px);\n}\n.hb-xk5-glass::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  background-image: radial-gradient(rgba(255, 255, 255, .06) .6px, transparent .6px);\n  background-size: 3px 3px;\n  mix-blend-mode: overlay;\n  opacity: .6;\n}\n.hb-xk5-ws {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  padding: 6px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: rgba(255, 255, 255, .06);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 24px -12px rgba(0, 0, 0, .6);\n}\n.hb-xk5-orb { position: relative; flex: none; width: 28px; height: 28px; border-radius: 9px; background: conic-gradient(from 210deg, var(--hb-xk5-c1), var(--hb-xk5-c2), var(--hb-xk5-c3), var(--hb-xk5-c1)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 4px 14px -4px var(--hb-xk5-c1); }\n.hb-xk5-orb::after { content: \"\"; position: absolute; inset: 7px; border-radius: 5px; background: rgba(8, 8, 11, .55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }\n.hb-xk5-wsn { min-width: 0; flex: 1; }\n.hb-xk5-wsn b { display: block; overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }\n.hb-xk5-wsn span { display: block; color: rgba(242, 242, 245, .55); font-size: 10.5px; line-height: 14px; }\n.hb-xk5-list { position: relative; display: flex; flex: 1; flex-direction: column; gap: 2px; margin: 12px 0 0; padding: 0; list-style: none; min-height: 0; }\n.hb-xk5-light {\n  position: absolute;\n  left: -20px;\n  right: -20px;\n  top: 0;\n  height: 110px;\n  background: radial-gradient(closest-side, rgba(255, 255, 255, .13), transparent);\n  pointer-events: none;\n  transform: translateY(calc(var(--hb-xk5-my) - 55px));\n  opacity: 0;\n  transition: opacity .3s ease;\n}\n.hb-xk5-list:hover .hb-xk5-light { opacity: 1; }\n.hb-xk5-item {\n  position: relative;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  width: 100%;\n  height: 34px;\n  margin: 0;\n  padding: 0 10px;\n  border: 1px solid transparent;\n  border-radius: 10px;\n  background: transparent;\n  color: rgba(242, 242, 245, .66);\n  font: inherit;\n  font-weight: 500;\n  text-align: left;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .3s ease;\n}\n.hb-xk5-item svg { flex: none; width: 17px; height: 17px; }\n.hb-xk5-item:hover { color: #fff; }\n.hb-xk5-item:focus-visible { outline: 2px solid rgba(255, 255, 255, .8); outline-offset: -1px; }\n.hb-xk5-item[aria-current=\"page\"] {\n  border-color: rgba(255, 255, 255, .14);\n  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 24px -14px rgba(0, 0, 0, .9);\n  color: #fff;\n}\n.hb-xk5-item[aria-current=\"page\"]::after {\n  content: \"\";\n  position: absolute;\n  top: -1px;\n  left: 16%;\n  right: 16%;\n  height: 1px;\n  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);\n}\n.hb-xk5-item[aria-current=\"page\"] svg { color: #fff; filter: drop-shadow(0 0 6px var(--hb-xk5-c2)); }\n.hb-xk5-il { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-xk5-badge { padding: 0 7px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: rgba(242, 242, 245, .8); font-size: 10.5px; line-height: 17px; }\n.hb-xk5-card {\n  position: relative;\n  margin-top: 10px;\n  padding: 10px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 12px;\n  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);\n}\n.hb-xk5-row { display: flex; justify-content: space-between; color: rgba(242, 242, 245, .7); font-size: 11px; }\n.hb-xk5-row b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-xk5-bar { position: relative; height: 5px; margin: 7px 0 9px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .1); }\n.hb-xk5-bar span { position: absolute; inset: 0 auto 0 0; width: var(--hb-xk5-p); border-radius: inherit; background: linear-gradient(90deg, var(--hb-xk5-c1), var(--hb-xk5-c2)); box-shadow: 0 0 10px var(--hb-xk5-c2); animation: hb-xk5-grow 1.2s cubic-bezier(.22, 1, .36, 1) both .2s; }\n.hb-xk5-up {\n  width: 100%;\n  height: 28px;\n  margin: 0;\n  border: 0;\n  border-radius: 8px;\n  background: #fff;\n  box-shadow: 0 6px 18px -8px var(--hb-xk5-c1), inset 0 -1px 0 rgba(0, 0, 0, .15);\n  color: #0b0b0f;\n  font: inherit;\n  font-size: 12px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease;\n}\n.hb-xk5-up:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px var(--hb-xk5-c1), inset 0 -1px 0 rgba(0, 0, 0, .15); }\n.hb-xk5-up:active { transform: translateY(0) scale(.98); }\n.hb-xk5-up:focus-visible { outline: 2px solid var(--hb-xk5-c2); outline-offset: 2px; }\n@keyframes hb-xk5-a { to { transform: translate(28%, 18%) scale(1.15); } }\n@keyframes hb-xk5-b { to { transform: translate(-30%, -16%) scale(.9); } }\n@keyframes hb-xk5-c { to { transform: translate(24%, -22%) scale(1.2); } }\n@keyframes hb-xk5-grow { from { width: 0; } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-xk5 *, .hb-xk5 *::before, .hb-xk5 *::after { transition: none !important; animation: none !important; }\n}\n`;\n\nfunction Glyph({ icon }: { icon?: SidebarGlassAuroraIconName | React.ReactNode }) {\n  if (typeof icon === \"string\" || icon === undefined) {\n    const d = PATHS[(icon as SidebarGlassAuroraIconName | undefined) ?? \"grid\"] ?? PATHS.grid;\n    return (\n      <svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n        <path d={d} />\n      </svg>\n    );\n  }\n  return <>{icon}</>;\n}\n\nexport function SidebarGlassAurora({\n  items = defaultItems,\n  active,\n  defaultActive,\n  onChange,\n  colors = [\"#6d5dfc\", \"#2fd3c5\", \"#ff4d8d\"],\n  workspace = \"Prism Studio\",\n  plan = \"Creator plan\",\n  usage = { label: \"Renders this month\", used: 742, total: 1000 },\n  onUpgrade,\n  upgradeLabel = \"Upgrade to Pro\",\n  speed = 18,\n  className = \"\",\n  style,\n  ...rest\n}: SidebarGlassAuroraProps) {\n  const [inner, setInner] = React.useState(defaultActive ?? items[0]?.id ?? \"\");\n  const current = active ?? inner;\n  const listRef = React.useRef<HTMLUListElement>(null);\n  const rootRef = React.useRef<HTMLElement>(null);\n\n  function onMove(e: React.PointerEvent<HTMLUListElement>) {\n    const r = listRef.current?.getBoundingClientRect();\n    if (!r) return;\n    rootRef.current?.style.setProperty(\"--hb-xk5-my\", `${(e.clientY - r.top).toFixed(1)}px`);\n  }\n\n  function onKey(e: React.KeyboardEvent<HTMLUListElement>) {\n    const btns = Array.from(listRef.current?.querySelectorAll<HTMLButtonElement>(\"button\") ?? []);\n    const at = btns.indexOf(document.activeElement as HTMLButtonElement);\n    if (at < 0) return;\n    let n = -1;\n    if (e.key === \"ArrowDown\") n = Math.min(btns.length - 1, at + 1);\n    else if (e.key === \"ArrowUp\") n = Math.max(0, at - 1);\n    else if (e.key === \"Home\") n = 0;\n    else if (e.key === \"End\") n = btns.length - 1;\n    if (n >= 0) {\n      e.preventDefault();\n      btns[n]?.focus();\n    }\n  }\n\n  function pick(id: string) {\n    if (active === undefined) setInner(id);\n    onChange?.(id);\n  }\n\n  const pct = usage ? Math.max(0, Math.min(100, (usage.used / Math.max(1, usage.total)) * 100)) : 0;\n  const ci = items.findIndex((i) => i.id === current);\n\n  const vars = {\n    \"--hb-xk5-c1\": colors[0],\n    \"--hb-xk5-c2\": colors[1],\n    \"--hb-xk5-c3\": colors[2],\n    \"--hb-xk5-sp\": `${speed}s`,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <nav ref={rootRef} aria-label={workspace} className={`hb-xk5 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-sidebar-glass-aurora\" precedence=\"default\">{css}</style>\n      <div className=\"hb-xk5-sky\" aria-hidden=\"true\">\n        <span className=\"hb-xk5-blob\" />\n        <span className=\"hb-xk5-blob\" />\n        <span className=\"hb-xk5-blob\" />\n      </div>\n      <div className=\"hb-xk5-glass\" aria-hidden=\"true\" />\n      <div className=\"hb-xk5-ws\">\n        <span className=\"hb-xk5-orb\" aria-hidden=\"true\" />\n        <span className=\"hb-xk5-wsn\">\n          <b>{workspace}</b>\n          {plan ? <span>{plan}</span> : null}\n        </span>\n      </div>\n      <ul ref={listRef} className=\"hb-xk5-list\" role=\"list\" onPointerMove={onMove} onKeyDown={onKey}>\n        <li className=\"hb-xk5-light\" aria-hidden=\"true\" />\n        {items.map((item, i) => (\n          <li key={item.id}>\n            <button\n              type=\"button\"\n              className=\"hb-xk5-item\"\n              aria-current={item.id === current ? \"page\" : undefined}\n              tabIndex={i === (ci >= 0 ? ci : 0) ? 0 : -1}\n              onClick={() => pick(item.id)}\n            >\n              <Glyph icon={item.icon} />\n              <span className=\"hb-xk5-il\">{item.label}</span>\n              {item.badge ? <span className=\"hb-xk5-badge\">{item.badge}</span> : null}\n            </button>\n          </li>\n        ))}\n      </ul>\n      {usage ? (\n        <div className=\"hb-xk5-card\">\n          <div className=\"hb-xk5-row\">\n            <span>{usage.label}</span>\n            <b>\n              {usage.used.toLocaleString(\"en-US\")}/{usage.total.toLocaleString(\"en-US\")}\n            </b>\n          </div>\n          <div\n            className=\"hb-xk5-bar\"\n            role=\"progressbar\"\n            aria-label={usage.label}\n            aria-valuemin={0}\n            aria-valuemax={usage.total}\n            aria-valuenow={usage.used}\n            style={{ \"--hb-xk5-p\": `${pct.toFixed(1)}%` } as React.CSSProperties}\n          >\n            <span />\n          </div>\n          {upgradeLabel ? (\n            <button type=\"button\" className=\"hb-xk5-up\" onClick={onUpgrade}>\n              {upgradeLabel}\n            </button>\n          ) : null}\n        </div>\n      ) : null}\n    </nav>\n  );\n}\n"
    }
  ]
}