{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ticker-vertical",
  "type": "registry:component",
  "title": "Ticker Vertical",
  "description": "A news ticker that scrolls upward in a loop. The row passing through the middle lights up, the edges fade out, and hover or focus pauses it. Two columns scroll in opposite directions.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "motion",
    "ticker",
    "news",
    "scroll",
    "marquee",
    "vertical",
    "feed"
  ],
  "docs": "https://hyperblur.dev/effects/ticker-vertical",
  "files": [
    {
      "path": "registry/hyperblur/ticker-vertical.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/ticker-vertical.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface TickerVerticalItem {\n  text: string;\n  meta?: string;\n  tag?: string;\n}\n\nexport interface TickerVerticalProps extends React.HTMLAttributes<HTMLDivElement> {\n  items: TickerVerticalItem[];\n  rows?: number;\n  rowHeight?: number;\n  speed?: number;\n  columns?: 1 | 2;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-zz5-up {\n  from { transform: translateY(0); }\n  to { transform: translateY(-50%); }\n}\n.hb-zz5 {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  font-family: inherit;\n  color: #ededed;\n  outline: none;\n}\n.hb-zz5 *, .hb-zz5 *::before, .hb-zz5 *::after { box-sizing: border-box; }\n.hb-zz5:focus-visible { outline: 2px solid var(--hb-zz5-accent); outline-offset: 3px; border-radius: 10px; }\n.hb-zz5-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  margin: -1px;\n  padding: 0;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border: 0;\n}\n.hb-zz5-cols {\n  display: grid;\n  grid-template-columns: repeat(var(--hb-zz5-n, 1), minmax(0, 1fr));\n  gap: 10px;\n  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--hb-zz5-rh) * 0.95), #000 calc(100% - var(--hb-zz5-rh) * 0.95), transparent 100%);\n  mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--hb-zz5-rh) * 0.95), #000 calc(100% - var(--hb-zz5-rh) * 0.95), transparent 100%);\n}\n.hb-zz5-col {\n  position: relative;\n  min-width: 0;\n  height: calc(var(--hb-zz5-rh) * var(--hb-zz5-rows));\n  overflow: hidden;\n  container-type: inline-size;\n}\n.hb-zz5-list {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n  animation: hb-zz5-up var(--hb-zz5-dur) linear infinite;\n  animation-direction: var(--hb-zz5-dir, normal);\n}\n.hb-zz5:hover .hb-zz5-list, .hb-zz5:focus-visible .hb-zz5-list { animation-play-state: paused; }\n.hb-zz5-r {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  height: var(--hb-zz5-rh);\n  padding: 0 12px;\n  font-size: 13px;\n  line-height: 1.2;\n  color: #8f8f8f;\n}\n.hb-zz5-tg {\n  flex: none;\n  padding: 2px 6px;\n  font-size: 9.5px;\n  font-weight: 600;\n  letter-spacing: 0.06em;\n  text-transform: uppercase;\n  line-height: 1.2;\n  color: #8f8f8f;\n  border: 1px solid #262626;\n  border-radius: 5px;\n}\n.hb-zz5-x {\n  flex: 1 1 auto;\n  min-width: 0;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.hb-zz5-m {\n  flex: none;\n  font-size: 11px;\n  font-variant-numeric: tabular-nums;\n  color: #6b6b6b;\n}\n@container (max-width: 200px) {\n  .hb-zz5-m { display: none; }\n}\n.hb-zz5-band {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: var(--hb-zz5-half);\n  height: var(--hb-zz5-rh);\n  overflow: hidden;\n  border-radius: 10px;\n  background: color-mix(in srgb, var(--hb-zz5-accent) 13%, #0f0f10);\n}\n.hb-zz5-band::after {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  border-radius: inherit;\n  border: 1px solid color-mix(in srgb, var(--hb-zz5-accent) 38%, transparent);\n  pointer-events: none;\n}\n.hb-zz5-band .hb-zz5-list { top: calc(var(--hb-zz5-half) * -1); }\n.hb-zz5-band .hb-zz5-r { color: #ffffff; font-weight: 500; }\n.hb-zz5-band .hb-zz5-tg { color: var(--hb-zz5-accent); border-color: color-mix(in srgb, var(--hb-zz5-accent) 45%, transparent); }\n.hb-zz5-band .hb-zz5-m { color: #a1a1a1; }\n@media (prefers-reduced-motion: reduce) {\n  .hb-zz5-list { animation: none; }\n}\n`;\n\nfunction Rows({ list }: { list: TickerVerticalItem[] }) {\n  return (\n    <>\n      {list.map((item, i) => (\n        <li key={i} className=\"hb-zz5-r\">\n          {item.tag ? <span className=\"hb-zz5-tg\">{item.tag}</span> : null}\n          <span className=\"hb-zz5-x\">{item.text}</span>\n          {item.meta ? <span className=\"hb-zz5-m\">{item.meta}</span> : null}\n        </li>\n      ))}\n    </>\n  );\n}\n\nfunction Column({ unit, reverse, dur }: { unit: TickerVerticalItem[]; reverse: boolean; dur: string }) {\n  const style = {\n    [\"--hb-zz5-dur\" as string]: `${dur}s`,\n    [\"--hb-zz5-dir\" as string]: reverse ? \"reverse\" : \"normal\",\n  } as React.CSSProperties;\n  return (\n    <div className=\"hb-zz5-col\" style={style} aria-hidden=\"true\">\n      <ul className=\"hb-zz5-list\">\n        <Rows list={unit} />\n        <Rows list={unit} />\n      </ul>\n      <div className=\"hb-zz5-band\">\n        <ul className=\"hb-zz5-list\">\n          <Rows list={unit} />\n          <Rows list={unit} />\n        </ul>\n      </div>\n    </div>\n  );\n}\n\nexport function TickerVertical({\n  items,\n  rows = 5,\n  rowHeight = 34,\n  speed = 24,\n  columns = 1,\n  accent = \"#2f7bff\",\n  className = \"\",\n  style,\n  tabIndex = 0,\n  ...rest\n}: TickerVerticalProps) {\n  const count = Math.max(3, Math.round(rows));\n  const rh = Math.max(20, rowHeight);\n  const n = items.length;\n  const repeat = n === 0 ? 1 : Math.max(1, Math.ceil((count + 1) / n));\n  const unit = Array.from({ length: n * repeat }, (_, i) => items[i % n]);\n  const dur = n === 0 ? \"1\" : ((unit.length * rh) / Math.max(4, speed)).toFixed(2);\n  const shift = Math.floor(n / 2);\n  const second = n === 0 ? unit : Array.from({ length: n * repeat }, (_, i) => items[(i + shift) % n]);\n  const cols = columns === 2 ? 2 : 1;\n\n  return (\n    <div\n      role=\"group\"\n      tabIndex={tabIndex}\n      {...rest}\n      className={`hb-zz5${className ? ` ${className}` : \"\"}`}\n      style={{\n        [\"--hb-zz5-accent\" as string]: accent,\n        [\"--hb-zz5-rh\" as string]: `${rh}px`,\n        [\"--hb-zz5-rows\" as string]: count,\n        [\"--hb-zz5-half\" as string]: `${Math.floor(count / 2) * rh}px`,\n        [\"--hb-zz5-n\" as string]: cols,\n        ...style,\n      }}\n    >\n      <style href=\"hb-ticker-vertical\" precedence=\"default\">{css}</style>\n      <ul className=\"hb-zz5-sr\">\n        {items.map((item, i) => (\n          <li key={i}>\n            {item.tag ? `${item.tag}: ` : \"\"}\n            {item.text}\n            {item.meta ? `, ${item.meta}` : \"\"}\n          </li>\n        ))}\n      </ul>\n      {n === 0 ? null : (\n        <div className=\"hb-zz5-cols\">\n          <Column unit={unit} reverse={false} dur={dur} />\n          {cols === 2 ? <Column unit={second} reverse dur={dur} /> : null}\n        </div>\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}