{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spinner",
  "type": "registry:ui",
  "title": "Spinner",
  "description": "Steady work in a small space: a sunk round well with a lit green arc turning at a constant speed; it shows only after a beat so quick actions never flash it.",
  "dependencies": [],
  "registryDependencies": [
    "https://metalui.dev/r/tokens.json"
  ],
  "files": [
    {
      "path": "packages/metalui/src/components/spinner/spinner.tsx",
      "type": "registry:ui",
      "target": "components/metalui/spinner/spinner.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\n\n/* ─────────────────────────────────────────────────────────\n * SPINNER, something is working and will be done soon, in a small space\n *\n *     0 ms   mounted, invisible: a quick action never flashes it\n *   400 ms   it fades in (160 ms): a sunk round well with a lit green arc and its tail\n *   always   the arc turns at a constant 900 ms a turn, linear: steady work has no spring\n *   gone     unmounted by the host when the work is done (no exit: the result is the news)\n * Reduce Motion: the arc stands still and breathes.\n * The well is the switch recipe's sunk track; the spinner recipe adds the arc and its motion.\n * ───────────────────────────────────────────────────────── */\n\nexport interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {\n  /** regular (16) beside text; small (12) inside compact controls. */\n  size?: 'regular' | 'small';\n  /** What is working, for assistive tech: \"Saving\". Defaults to \"Loading\". */\n  label?: string;\n}\n\nconst ROOT = 'mu-spinner relative inline-block flex-none rounded-full recipe-switch spinner-arrive';\nconst SIZE = { regular: 'size-spinner-size', small: 'size-spinner-small' };\n\n/** A small sign of steady work. Mount it while the work runs; it shows only after a beat. */\nexport const Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner({ size = 'regular', label = 'Loading', className, ...props }, ref) {\n  return (\n    <span ref={ref} role=\"status\" aria-label={label} data-size={size} className={[ROOT, SIZE[size], className].filter(Boolean).join(' ')} {...props}>\n      <span aria-hidden className=\"mu-spinner-arc spinner-arc\" />\n    </span>\n  );\n});\n"
    }
  ],
  "docs": "Agent guide: https://metalui.dev/r/spinner.md. SwiftUI: MetalSpinner in the MetalUI Swift package."
}
