{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spinner",
  "title": "Spinner",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "A compact loading indicator with three sizes, an accessible label, and reduced-motion behavior.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "utils",
    "https://ui.ballmac.com/r/i18n.json"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/spinner.tsx",
      "content": "// Ballmac UI: Spinner. https://ui.ballmac.com/components/spinner\n// Based on shadcn/ui Spinner (MIT, Copyright (c) 2023 shadcn), adding size variants and an announced loading state.\n\"use client\"\n\nimport * as React from \"react\"\nimport { LoaderCircle } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\nimport { useMessages } from \"@/lib/ballmac/i18n\"\n\ntype SpinnerProps = React.ComponentProps<\"span\"> & {\n  /** Size of the loading indicator. */\n  size?: \"sm\" | \"default\" | \"lg\"\n  /** Text announced by assistive technology. */\n  label?: string\n}\nfunction Spinner({\n  className,\n  size = \"default\",\n  label,\n  ...props\n}: SpinnerProps) {\n  const msg = useMessages()\n  label ??= msg(\"spinner.label\", \"Loading\")\n  return (\n    <span\n      data-slot=\"spinner\"\n      role=\"status\"\n      aria-label={label}\n      className={cn(\n        \"inline-flex items-center justify-center text-current\",\n        className,\n      )}\n      {...props}\n    >\n      <LoaderCircle\n        aria-hidden=\"true\"\n        className={cn(\n          \"motion-safe:animate-spin\",\n          size === \"sm\" ? \"size-3.5\" : size === \"lg\" ? \"size-6\" : \"size-4\",\n        )}\n      />\n      <span className=\"sr-only\">{label}</span>\n    </span>\n  )\n}\nexport { Spinner, type SpinnerProps }\n",
      "type": "registry:ui",
      "target": "@components/ballmac/spinner.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "loading",
      "busy",
      "indicator"
    ],
    "version": "1.0.0",
    "updated": "2026-09-29",
    "ai": {
      "summary": "A compact loading indicator with three sizes, an accessible label, and reduced-motion behavior.",
      "whenToUse": [
        "Show a short in-progress action",
        "Place inside a disabled submit button"
      ],
      "whenNotToUse": [
        "Use progress for a measurable operation"
      ],
      "composesWith": [
        "button"
      ],
      "a11y": [],
      "customization": [
        "size: sm | default | lg",
        "label: screen reader announcement"
      ]
    },
    "source": {
      "name": "shadcn/ui Spinner",
      "url": "https://github.com/shadcn-ui/ui",
      "license": "MIT",
      "copyright": "Copyright (c) 2023 shadcn",
      "modified": true
    },
    "examples": [
      "spinner-demo",
      "spinner-states"
    ],
    "url": "https://ui.ballmac.com/components/spinner"
  },
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}