{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "number-ticker",
  "title": "Number Ticker",
  "description": "Odometer digits that count into view, then mark which digits moved on every change, tinted by trend.",
  "dependencies": [
    "motion"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "utils",
    "https://reactmotionkit.com/r/compose-refs.json",
    "https://reactmotionkit.com/r/motion-kit.json",
    "https://reactmotionkit.com/r/motion-presets.json"
  ],
  "files": [
    {
      "path": "ui/number-ticker.tsx",
      "content": "\"use client\"\n\nimport {\n  animate,\n  motion,\n  type MotionValue,\n  useInView,\n  useMotionValue,\n  useTransform,\n} from \"motion/react\"\nimport { type ComponentProps, useCallback, useEffect, useMemo, useRef, useState } from \"react\"\n\nimport { composeRefs } from \"@/lib/compose-refs\"\nimport { durations, easings, type Temperament } from \"@/lib/motion\"\nimport { useMotionKit } from \"@/lib/motion-kit\"\nimport { cn } from \"@/lib/utils\"\n\n/*\n * Number ticker: an odometer. Every digit is a fixed, tabular slot whose column of 0-9 rolls\n * on the temperament spring (charge: it pulls back a little; action: it spins, low digits\n * first; settle: the spring's own bounce past the digit). A 2 px brand bar under the number\n * fills on the same timeline and squashes against its end when the count lands. Digits are\n * only translated, never scaled, and every slot exists from the first frame, so nothing\n * around the number moves.\n *\n * Later changes point at what moved: the bar gives up its full fill and draws itself under the\n * digits that changed only (so 48,210 -> 48,350 underlines \"350\"), growing from the units on the\n * roll's own timeline, while those digits take the trend tone. After a short hold both let go.\n */\n\n/** Count length when `duration` is not set: long enough to see low digits spin, short for a dashboard. */\nconst DEFAULT_COUNT_SECONDS = 1.8\n\n/* The count starts once the number is 10% inside the viewport, so people see it land. */\nconst IN_VIEW_MARGIN = \"0px 0px -10% 0px\"\n\n/*\n * Extra full turns a column may make on a big change (units spin, thousands just roll).\n * One keeps the strip short: a blank, the start loop, a loop for wrapping past 9, the spin.\n */\nconst MAX_SPINS = 1\nconst LOOPS = MAX_SPINS + 2\n/* Blank cell (no digit there yet), LOOPS x 0-9, and a trailing 0 so a 9 rolling on stays whole. */\nconst CELLS = [\" \", ...Array.from({ length: LOOPS * 10 + 1 }, (_, i) => String(i % 10))]\n\n/*\n * Charge: the column pulls back by `squash` x this many digit heights before the throw\n * (lively 0.15 of a digit); at the raw squash (5%) the dip would be under a pixel.\n */\nconst CHARGE_CELLS = 3\n\n/*\n * Landing: the 2 px bar thickens by `squash` x this and shortens by `squash` against its end\n * (lively: twice as thick, 5% shorter), clamped so playful never turns it into a block.\n */\nconst BAR_SQUASH = 20\nconst MAX_BAR_THICKEN = 2.5\n\n/* Soft top and bottom edge of each slot, outside the line box so a digit at rest is never dimmed. */\nconst SLOT_EDGE = \"0.1em\"\n/*\n * How long a change stays marked once it lands: long enough to read which digits moved,\n * short enough that a live number every couple of seconds is calm between ticks.\n */\nconst CHANGE_HOLD_SECONDS = 0.6\n\nconst SLOT_MASK = `linear-gradient(to bottom, transparent, #000 ${SLOT_EDGE}, #000 calc(100% - ${SLOT_EDGE}), transparent)`\n\nexport interface NumberTickerProps extends Omit<ComponentProps<\"span\">, \"children\"> {\n  /** The number to count to. Changing it later rolls from the number on screen. */\n  value: number\n  /** The number to count from. */\n  from?: number\n  /** Count duration in seconds (how long the digits roll). */\n  duration?: number\n  /** Delay before counting starts once visible, in seconds. */\n  delay?: number\n  /** BCP 47 locale used to format the number. Fixed by default so server and client agree. */\n  locale?: string\n  /**\n   * `Intl.NumberFormat` options, e.g. `{ style: \"currency\", currency: \"EUR\" }`.\n   * Without fraction digit options, the count uses as many decimals as `value`\n   * and `from`, so intermediate frames never show extra digits.\n   */\n  format?: Intl.NumberFormatOptions\n  /**\n   * Keep the slots of `from` after the count, so a number counting down keeps the width it\n   * started with. Turn off to shrink to the final value once it lands. Slots are always\n   * reserved while counting, so text around the number never shifts mid-count.\n   */\n  reserveWidth?: boolean\n  /** The brand bar under the number that fills with the count. Turn off for numbers inside a sentence. */\n  bar?: boolean\n  /**\n   * Tone of a change after the first count: `true` marks a rise success and a fall destructive,\n   * `\"inverse\"` the opposite (latency, open tickets), `false` keeps the brand color for both.\n   */\n  trend?: boolean | \"inverse\"\n  /**\n   * Announce each new value politely to screen readers once it lands (`aria-live=\"polite\"`).\n   * Each roll is one announcement, so a live number never floods the reader mid-count.\n   */\n  announce?: boolean\n  /** Motion intensity: how far digits pull back, bounce and stagger, how hard the bar squashes. Wins over `MotionKitProvider`. */\n  temperament?: Temperament\n}\n\n/** A digit 0-9, or `null` for an empty slot (a digit the other end of the count does not have). */\ntype Cell = number | null\n\n/** Tone of a marked change: a good move, a bad one, or neutral (brand). */\ntype Tone = \"good\" | \"bad\" | \"brand\"\n\ninterface Column {\n  index: MotionValue<number>\n  node: HTMLElement | null\n}\n\n/** The digit a strip position shows, `null` for the blank. */\nfunction cellAt(index: number): Cell {\n  const i = Math.round(index)\n  return i < 1 ? null : (i - 1) % 10\n}\n\ninterface Sections {\n  prefix: string\n  int: string[]\n  frac: string[]\n  suffix: string\n}\n\ntype Slot =\n  | { kind: \"digit\"; key: string; target: Cell; start: Cell; place: number; rank: number }\n  | { kind: \"glyph\"; key: string; char: string; visible: boolean }\n\nfunction decimalsOf(n: number) {\n  if (!Number.isFinite(n)) return 0\n  const [, fraction = \"\"] = String(n).split(\".\")\n  return Math.min(fraction.length, 20)\n}\n\n/** Splits a formatted number into sign/currency, integer, fraction and unit, whatever the locale. */\nfunction sectionsOf(formatter: Intl.NumberFormat, n: number): Sections {\n  const out: Sections = { prefix: \"\", int: [], frac: [], suffix: \"\" }\n  let stage = 0\n  for (const part of formatter.formatToParts(n)) {\n    const int = part.type === \"integer\" || part.type === \"group\"\n    const frac = part.type === \"decimal\" || part.type === \"fraction\"\n    if (int && stage <= 1) {\n      stage = 1\n      out.int.push(...Array.from(part.value))\n    } else if (frac && stage <= 2) {\n      stage = 2\n      out.frac.push(...Array.from(part.value))\n    } else if (stage === 0) {\n      out.prefix += part.value\n    } else {\n      stage = 3\n      out.suffix += part.value\n    }\n  }\n  return out\n}\n\nfunction cellOf(char: string | undefined): Cell | \"glyph\" {\n  if (char === undefined) return null\n  return /^[0-9]$/.test(char) ? Number(char) : \"glyph\"\n}\n\n/** Strip index of a cell in the first loop (0 is the blank). */\nfunction indexOf(cell: Cell) {\n  return cell === null ? 0 : 1 + cell\n}\n\n/** The same glyph in the loop a roll starts from: the bottom loop going up, the top one going down. */\nfunction rebase(index: number, up: boolean) {\n  if (index < 1) return index\n  const offset = (((index - 1) % 10) + 10) % 10\n  return 1 + offset + (up ? 0 : 10 * (LOOPS - 1))\n}\n\n/** Where a column lands: the next copy of the digit in the direction of the count, plus spins. */\nfunction landingOf(from: number, cell: Cell, up: boolean, spins: number) {\n  if (cell === null) return 0\n  if (from < 1) return 1 + cell\n  let to = indexOf(cell) + (up ? 0 : 10 * (LOOPS - 1))\n  if (up) {\n    while (to < from - 0.001) to += 10\n    to += 10 * spins\n  } else {\n    while (to > from + 0.001) to -= 10\n    to -= 10 * spins\n  }\n  return Math.min(Math.max(to, 0), CELLS.length - 1)\n}\n\n/**\n * An odometer for a number: when it scrolls into view each digit rolls from `from` to `value`,\n * low digits first, and a brand bar fills underneath, then squashes as the count lands. Later\n * changes roll from the number on screen and the bar marks the digits that moved, in the trend\n * tone. Screen readers always get the final value; reduced\n * motion shows it at once.\n */\nexport function NumberTicker({\n  value,\n  from = 0,\n  duration = DEFAULT_COUNT_SECONDS,\n  delay = 0,\n  locale = \"en-US\",\n  format,\n  reserveWidth = true,\n  bar = true,\n  trend = false,\n  announce = false,\n  temperament,\n  className,\n  ref,\n  ...props\n}: NumberTickerProps) {\n  const rootRef = useRef<HTMLSpanElement>(null)\n  const valueRef = useRef<HTMLSpanElement>(null)\n  const inView = useInView(rootRef, { once: true, margin: IN_VIEW_MARGIN })\n  const motionKit = useMotionKit(temperament)\n  const { reduced } = motionKit\n\n  // Every number whose slots are on screen: what the count left from, then each new target.\n  const [trail, setTrail] = useState<number[]>(() =>\n    Object.is(from, value) ? [value] : [from, value],\n  )\n  if (!Object.is(trail[trail.length - 1], value)) setTrail([...trail, value])\n\n  // Columns register their roll position; the count drives them all from one effect.\n  const columns = useRef(new Map<string, Column>())\n  const register = useCallback((key: string, column: Column) => {\n    columns.current.set(key, column)\n    return () => {\n      if (columns.current.get(key) === column) columns.current.delete(key)\n    }\n  }, [])\n  const markRef = useRef<HTMLSpanElement>(null)\n  const progress = useMotionValue(0)\n  const fillOpacity = useMotionValue(1)\n  const markLength = useMotionValue(0)\n  const markOpacity = useMotionValue(0)\n  // The hold that releases the last marked change; it outlives the count's effect on purpose.\n  const release = useRef<{ stop: () => void } | undefined>(undefined)\n  const [spoken, setSpoken] = useState(value)\n  const barLength = useMotionValue(1)\n  const barThickness = useMotionValue(1)\n  // The value the last count aimed at, the one it landed on, and its direction.\n  const aimed = useRef(from)\n  const landed = useRef<number | undefined>(undefined)\n  const rising = useRef(value >= from)\n\n  // Keyed by value, not identity, so inline `format` objects don't restart the count.\n  const formatKey = JSON.stringify(format ?? {})\n  const formatter = useMemo(() => {\n    const options = JSON.parse(formatKey) as Intl.NumberFormatOptions\n    const explicit =\n      options.minimumFractionDigits !== undefined ||\n      options.maximumFractionDigits !== undefined ||\n      options.maximumSignificantDigits !== undefined ||\n      options.notation !== undefined\n    if (!explicit) {\n      // Pin the decimals to what the end state needs, within the style's own range\n      // (currency keeps its cents, percent its whole numbers).\n      const range = new Intl.NumberFormat(locale, options).resolvedOptions()\n      const min = range.minimumFractionDigits ?? 0\n      const max = range.maximumFractionDigits ?? 3\n      const digits = Math.min(Math.max(decimalsOf(value), decimalsOf(from), min), max)\n      options.minimumFractionDigits = digits\n      options.maximumFractionDigits = digits\n    }\n    return new Intl.NumberFormat(locale, options)\n  }, [locale, formatKey, value, from])\n\n  const started = inView || reduced\n  const plan = useMemo(() => {\n    const kept = reserveWidth && !trail.some((n) => Object.is(n, from)) ? [from, ...trail] : trail\n    const all = kept.map((n) => sectionsOf(formatter, n))\n    const target = sectionsOf(formatter, value)\n    const start = sectionsOf(formatter, trail[0] ?? value)\n    const shown = started ? target : start\n    const slots: Slot[] = []\n    // Integer digits align on the right, fraction digits on the decimal separator.\n    const intLength = Math.max(...all.map((s) => s.int.length))\n    const fracLength = Math.max(...all.map((s) => s.frac.length))\n    const at = (s: Sections, side: \"int\" | \"frac\", i: number) =>\n      side === \"int\" ? s.int[s.int.length - 1 - i] : s.frac[i]\n    const add = (side: \"int\" | \"frac\", i: number, place: number) => {\n      const key = `${side}${i}`\n      const cells = all.map((s) => cellOf(at(s, side, i)))\n      const end = cellOf(at(target, side, i))\n      const begin = cellOf(at(start, side, i))\n      if (cells.every((c) => c !== \"glyph\") && end !== \"glyph\" && begin !== \"glyph\") {\n        slots.push({ kind: \"digit\", key, target: end, start: begin, place, rank: 0 })\n        return\n      }\n      const char = at(target, side, i) ?? all.map((s) => at(s, side, i)).find(Boolean) ?? \"\"\n      slots.push({ kind: \"glyph\", key, char, visible: at(shown, side, i) !== undefined })\n    }\n    for (let i = intLength - 1; i >= 0; i--) add(\"int\", i, 10 ** i)\n    for (let i = 0; i < fracLength; i++) add(\"frac\", i, 10 ** -i)\n    // Stagger right to left: the lowest digit moves first, as on a meter.\n    let rank = 0\n    for (let i = slots.length - 1; i >= 0; i--) {\n      const slot = slots[i]\n      if (slot?.kind === \"digit\") slot.rank = rank++\n    }\n    return { slots, prefix: shown.prefix, suffix: shown.suffix, lastRank: Math.max(rank - 1, 0) }\n  }, [formatter, trail, value, from, reserveWidth, started])\n\n  useEffect(() => () => release.current?.stop(), [])\n\n  useEffect(() => {\n    const digits = plan.slots.filter((slot) => slot.kind === \"digit\")\n    const settle = () => {\n      const next = reserveWidth && !Object.is(from, value) ? [from, value] : [value]\n      setTrail((current) => (current.join(\"|\") === next.join(\"|\") ? current : next))\n      setSpoken(value)\n    }\n    const nodes = digits.map((slot) => columns.current.get(slot.key)?.node ?? null)\n    const unmark = () => {\n      for (const node of nodes) if (node) delete node.dataset.tone\n    }\n    /* Tints the moved digits and lays the mark from the first of them to the last digit. */\n    const mark = (moved: Set<string>, up: boolean) => {\n      release.current?.stop()\n      release.current = undefined\n      unmark()\n      const changed = digits.flatMap((slot, i) => (moved.has(slot.key) ? [nodes[i]] : []))\n      const first = changed[0]\n      const last = nodes[nodes.length - 1]\n      if (!first || !last) {\n        markOpacity.jump(0)\n        fillOpacity.jump(1)\n        return false\n      }\n      const good = trend === \"inverse\" ? !up : up\n      const tone: Tone = trend === false ? \"brand\" : good ? \"good\" : \"bad\"\n      for (const node of changed) if (node) node.dataset.tone = tone\n      const line = markRef.current\n      if (line) {\n        line.dataset.tone = tone\n        line.style.left = `${first.offsetLeft}px`\n        line.style.width = `${last.offsetLeft + last.offsetWidth - first.offsetLeft}px`\n      }\n      return true\n    }\n    /* After the hold the digits lose their tone, the mark fades and the full fill returns. */\n    const letGo = (fade: typeof motionKit.tween) => {\n      let held = true\n      const hold = animate(0, 1, { duration: motionKit.seconds(CHANGE_HOLD_SECONDS) })\n      const after: { stop: () => void }[] = []\n      void hold.then(() => {\n        if (!held) return\n        unmark()\n        after.push(animate(markOpacity, 0, fade), animate(fillOpacity, 1, fade))\n      })\n      release.current = {\n        stop: () => {\n          held = false\n          hold.stop()\n          for (const animation of after) animation.stop()\n        },\n      }\n    }\n\n    if (reduced) {\n      const changed = landed.current !== undefined && !Object.is(landed.current, value)\n      const moved = new Set<string>()\n      for (const slot of digits) {\n        const index = columns.current.get(slot.key)?.index\n        if (index && cellAt(index.get()) !== slot.target) moved.add(slot.key)\n        index?.jump(indexOf(slot.target))\n      }\n      progress.jump(1)\n      // Static version of the change mark: it appears at once, holds, then fades.\n      if (changed && mark(moved, value > (landed.current ?? value))) {\n        markLength.jump(1)\n        markOpacity.jump(1)\n        fillOpacity.jump(0)\n        letGo(motionKit.fade)\n      }\n      landed.current = value\n      aimed.current = value\n      let live = true\n      void Promise.resolve().then(() => {\n        if (live) settle()\n      })\n      const node = valueRef.current\n      const fade = changed && node ? animate(node, { opacity: [0, 1] }, motionKit.fade) : undefined\n      return () => {\n        live = false\n        fade?.stop()\n      }\n    }\n    if (!inView) return\n    if (Object.is(landed.current, value) && progress.get() >= 1) return\n\n    const start = aimed.current\n    aimed.current = value\n    const up = Object.is(start, value) ? rising.current : value > start\n    rising.current = up\n    const change = Math.abs(value - start)\n    const entering = progress.get() < 1\n    const lead = motionKit.seconds(delay)\n    const charge = motionKit.seconds(motionKit.values.anticipation)\n    const pull = motionKit.values.squash * CHARGE_CELLS * (up ? -1 : 1)\n    // The roll lasts `duration` (a prop, scaled by the time scale); bounce comes from the temperament.\n    const roll = {\n      type: \"spring\",\n      visualDuration: motionKit.seconds(duration),\n      bounce: motionKit.values.bounce,\n    } as const\n    const running: { stop: () => void }[] = []\n    let live = true\n    const moved = new Set<string>()\n\n    for (const slot of digits) {\n      const index = columns.current.get(slot.key)?.index\n      if (!index) continue\n      // Moved = shows another digit than it will land on (a spring still settling does not count).\n      if (cellAt(index.get()) !== slot.target) moved.add(slot.key)\n      const begin = rebase(index.get(), up)\n      index.jump(begin)\n      const spins = Math.min(MAX_SPINS, Math.floor(change / (slot.place * 10)))\n      const to = landingOf(begin, slot.target, up, spins)\n      if (Math.abs(to - begin) < 0.001) continue\n      const stagger = motionKit.staggerDelay(slot.rank)\n      const charging = animate(index, begin + pull, {\n        duration: charge,\n        delay: lead,\n        ease: easings.outQuart,\n      })\n      running.push(charging)\n      void charging.then(() => {\n        if (live) running.push(animate(index, to, { ...roll, delay: stagger }))\n      })\n    }\n\n    // One timeline: the bar fills from the throw until the last (highest) digit lands.\n    const total = motionKit.seconds(duration) + motionKit.staggerDelay(plan.lastRank)\n    const timing = { duration: total, delay: lead + charge }\n    // A change (not the entrance) draws the mark under the moved digits on the same clock.\n    const marking = !entering && mark(moved, up)\n    if (marking) {\n      markLength.jump(0)\n      markOpacity.jump(1)\n      running.push(animate(fillOpacity, 0, motionKit.tween))\n    }\n    const clock = entering\n      ? animate(progress, 1, { ...timing, ease: easings.outExpo })\n      : animate(markLength, marking ? 1 : markLength.get(), { ...timing, ease: easings.outExpo })\n    running.push(clock)\n    void clock.then(() => {\n      if (!live) return\n      landed.current = value\n      settle()\n      if (marking) letGo(motionKit.tween)\n      // Settle: the bar squashes against its end, then springs back.\n      const squash = motionKit.values.squash\n      if (squash === 0) return\n      const thicken = Math.min(1 + squash * BAR_SQUASH, MAX_BAR_THICKEN)\n      const hit = { duration: motionKit.seconds(durations.micro), ease: easings.outQuart }\n      void animate(barThickness, thicken, hit).then(() => {\n        animate(barThickness, 1, motionKit.springSmall)\n      })\n      void animate(barLength, 1 - squash, hit).then(() => {\n        animate(barLength, 1, motionKit.springSmall)\n      })\n    })\n\n    return () => {\n      live = false\n      for (const animation of running) animation.stop()\n    }\n  }, [\n    inView,\n    reduced,\n    value,\n    from,\n    plan,\n    duration,\n    delay,\n    reserveWidth,\n    motionKit,\n    trend,\n    progress,\n    barLength,\n    barThickness,\n    fillOpacity,\n    markLength,\n    markOpacity,\n  ])\n\n  return (\n    <span\n      ref={composeRefs(rootRef, ref)}\n      data-slot=\"number-ticker\"\n      className={cn(\"relative inline-block whitespace-nowrap tabular-nums\", className)}\n      {...props}\n    >\n      <span ref={valueRef} aria-hidden data-slot=\"number-ticker-value\" className=\"select-none\">\n        {plan.prefix}\n        {plan.slots.map((slot) =>\n          slot.kind === \"digit\" ? (\n            <DigitColumn key={slot.key} id={slot.key} start={slot.start} register={register} />\n          ) : (\n            <motion.span\n              key={slot.key}\n              initial={false}\n              animate={{ opacity: slot.visible ? 1 : 0 }}\n              transition={motionKit.tween}\n            >\n              {slot.char}\n            </motion.span>\n          ),\n        )}\n        {plan.suffix}\n      </span>\n      {bar && (\n        // Track and fill: a 2 px rounded bar, the fill scaled from the left, the squash at the right end.\n        <motion.span\n          aria-hidden\n          data-slot=\"number-ticker-bar\"\n          className=\"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 origin-right rounded-[1px] bg-brand-muted\"\n          style={{ scaleX: barLength, scaleY: barThickness }}\n        >\n          <motion.span\n            data-slot=\"number-ticker-fill\"\n            className=\"block h-full origin-left rounded-[1px] bg-brand\"\n            style={{ scaleX: progress, opacity: fillOpacity }}\n          />\n          {/* The change mark: placed under the moved digits, grown from the units end. */}\n          <motion.span\n            ref={markRef}\n            data-slot=\"number-ticker-mark\"\n            className=\"absolute inset-y-0 left-0 w-0 origin-right rounded-[1px] bg-brand data-[tone=bad]:bg-destructive data-[tone=good]:bg-success\"\n            style={{ scaleX: markLength, opacity: markOpacity }}\n          />\n        </motion.span>\n      )}\n      <span\n        className=\"sr-only\"\n        aria-live={announce ? \"polite\" : undefined}\n        aria-atomic={announce ? true : undefined}\n      >\n        {formatter.format(announce ? spoken : value)}\n      </span>\n    </span>\n  )\n}\n\ninterface DigitColumnProps {\n  id: string\n  /** The digit shown before the first roll. */\n  start: Cell\n  register: (key: string, column: Column) => () => void\n}\n\n/** One tabular slot: an invisible 0 holds the width, a strip of digits rolls behind a soft mask. */\nfunction DigitColumn({ id, start, register }: DigitColumnProps) {\n  const index = useMotionValue(indexOf(start))\n  const y = useTransform(index, (i) => `${(-i / CELLS.length) * 100}%`)\n  const nodeRef = useRef<HTMLSpanElement>(null)\n  useEffect(() => register(id, { index, node: nodeRef.current }), [register, id, index])\n  return (\n    <span\n      ref={nodeRef}\n      data-slot=\"number-ticker-digit\"\n      className=\"relative -my-[0.1em] inline-block py-[0.1em] transition-colors data-[tone=bad]:text-destructive data-[tone=brand]:text-brand data-[tone=good]:text-success\"\n      style={{ maskImage: SLOT_MASK, WebkitMaskImage: SLOT_MASK }}\n    >\n      <span className=\"invisible\">0</span>\n      <motion.span\n        className=\"absolute inset-x-0 top-[0.1em] flex flex-col items-center\"\n        style={{ y }}\n      >\n        {CELLS.map((cell, i) => (\n          <span key={i}>{cell}</span>\n        ))}\n      </motion.span>\n    </span>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "cssVars": {
    "theme": {
      "color-brand": "var(--brand)",
      "color-brand-muted": "var(--brand-muted)",
      "color-success": "var(--success)"
    },
    "light": {
      "brand": "oklch(0.55 0.2 278)",
      "brand-muted": "oklch(0.55 0.2 278 / 0.12)",
      "success": "oklch(0.56 0.14 155)"
    },
    "dark": {
      "brand": "oklch(0.7 0.16 278)",
      "brand-muted": "oklch(0.7 0.16 278 / 0.16)",
      "success": "oklch(0.72 0.15 155)"
    }
  },
  "meta": {
    "tier": "free",
    "collection": "interface",
    "needsImage": false,
    "addedAt": "2026-10-12",
    "tags": [
      "counter",
      "stats",
      "numbers"
    ],
    "triggers": [
      "in-view",
      "value"
    ],
    "wave": "0",
    "tech": [],
    "presets": [],
    "keyboard": [],
    "reducedMotion": "Digits jump straight to the final value with no count or roll; a change is marked at once, held, then fades.",
    "heavy": false,
    "ai": {
      "summary": "Odometer number that counts into view and marks which digits changed",
      "useCases": [
        "Live orders and revenue figures on a dashboard",
        "Queue length that updates while people watch",
        "Total after an action in a summary card",
        "Compact and percent stats such as 18.4K or 99.6%"
      ],
      "whenToUse": "Use it for a few key figures that change while people look at them. It counts once on first view, then rolls on each change, underlines the digits that moved and tints by trend.",
      "whenNotToUse": "A page full of counting numbers is noise, so keep one row per section. For a deadline use `countdown`; for completion use `progress`.",
      "pairsWith": [
        "chart",
        "status-badge",
        "progress",
        "data-table"
      ],
      "contexts": [
        "dashboard",
        "saas-app",
        "landing",
        "marketing-site"
      ],
      "keywords": [
        "number ticker",
        "counter",
        "odometer",
        "count up",
        "animated number",
        "stats",
        "kpi",
        "metric",
        "live figure",
        "rolling digits"
      ],
      "triggers": [
        "load",
        "value"
      ]
    }
  },
  "categories": [
    "data"
  ],
  "type": "registry:ui"
}