{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader-signal-bars",
  "type": "registry:component",
  "title": "Loader Signal Bars",
  "description": "Signal bars of growing height light up one after another, like a device searching for a connection.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "loaders",
    "loader",
    "signal",
    "wifi",
    "network",
    "connection",
    "css"
  ],
  "docs": "https://hyperblur.dev/effects/loader-signal-bars",
  "files": [
    {
      "path": "registry/hyperblur/loader-signal-bars.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/loader-signal-bars.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LoaderSignalBarsProps extends React.HTMLAttributes<HTMLSpanElement> {\n  size?: number;\n  color?: string;\n  accent?: string;\n  speed?: number;\n  bars?: number;\n  label?: string;\n}\n\nconst css = `\n.hb-yb5 {\n  position: relative;\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 8px;\n  vertical-align: middle;\n  box-sizing: border-box;\n  font-family: inherit;\n}\n.hb-yb5 *, .hb-yb5 *::before, .hb-yb5 *::after { box-sizing: border-box; }\n.hb-yb5-b {\n  display: flex;\n  flex: none;\n  align-items: flex-end;\n  gap: calc(var(--hb-yb5-s) * 0.09);\n  height: var(--hb-yb5-s);\n}\n.hb-yb5-b i {\n  display: block;\n  width: calc(var(--hb-yb5-s) * 0.17);\n  height: calc(var(--hb-yb5-h) * 100%);\n  min-height: 3px;\n  border-radius: calc(var(--hb-yb5-s) * 0.06);\n  background: linear-gradient(180deg, var(--hb-yb5-a), var(--hb-yb5-c));\n  transform-origin: 50% 100%;\n  transform: scaleY(0.3);\n  opacity: 0.22;\n  animation: hb-yb5-rise var(--hb-yb5-d) cubic-bezier(0.22, 1, 0.36, 1) infinite;\n  animation-delay: calc(var(--hb-yb5-i) * var(--hb-yb5-d) * 0.11);\n}\n.hb-yb5-l {\n  font-size: 12px;\n  line-height: 1.2;\n  letter-spacing: 0.01em;\n  color: inherit;\n  opacity: 0.72;\n  white-space: nowrap;\n}\n.hb-yb5-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n  border: 0;\n}\n@keyframes hb-yb5-rise {\n  0% { transform: scaleY(0.3); opacity: 0.22; }\n  22%, 66% { transform: scaleY(1); opacity: 1; }\n  88%, 100% { transform: scaleY(0.3); opacity: 0.22; }\n}\n@keyframes hb-yb5-fade {\n  0%, 100% { opacity: 0.22; }\n  22%, 66% { opacity: 1; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-yb5-b i { transform: none; animation-name: hb-yb5-fade; animation-timing-function: ease-in-out; }\n}\n`;\n\nexport function LoaderSignalBars({\n  size = 36,\n  color = \"#2f7bff\",\n  accent = \"#7fb3ff\",\n  speed = 1.8,\n  bars = 4,\n  label,\n  className = \"\",\n  style,\n  ...rest\n}: LoaderSignalBarsProps) {\n  const n = Math.max(3, Math.min(7, Math.round(bars)));\n  const vars = {\n    \"--hb-yb5-s\": `${size}px`,\n    \"--hb-yb5-d\": `${(speed > 0 ? speed : 1.8).toFixed(3)}s`,\n    \"--hb-yb5-c\": color,\n    \"--hb-yb5-a\": accent,\n    ...style,\n  } as React.CSSProperties;\n\n  return (\n    <span role=\"status\" className={`hb-yb5 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-loader-signal-bars\" precedence=\"default\">{css}</style>\n      <span className=\"hb-yb5-b\" aria-hidden=\"true\">\n        {Array.from({ length: n }, (_, i) => (\n          <i\n            key={i}\n            style={\n              {\n                \"--hb-yb5-i\": i,\n                \"--hb-yb5-h\": ((i + 1) / n).toFixed(3),\n              } as React.CSSProperties\n            }\n          />\n        ))}\n      </span>\n      <span className={label ? \"hb-yb5-l\" : \"hb-yb5-sr\"}>{label ?? \"Loading\"}</span>\n    </span>\n  );\n}\n"
    }
  ]
}