{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "spinner",
  "title": "Spinner",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-svelte/components/spinner/Spinner.svelte",
      "content": "<script lang=\"ts\" module>\n  import type { LucideProps } from '@lucide/svelte'\n  import type { SpinnerVariants } from './spinner.variants'\n\n  // LucideProps (extends SVGAttributes) so rest-spread into the icon\n  // typechecks; `size` is the cva tier, not lucide's pixel size.\n  export interface SpinnerProps extends Omit<LucideProps, 'size'> {\n    size?: SpinnerVariants['size']\n  }\n</script>\n\n<script lang=\"ts\">\n  import { Loader2 } from '@lucide/svelte'\n  import { cn } from '$lib/utils'\n  import { spinnerVariants } from './spinner.variants'\n\n  let { class: className, size = 'default', ...restProps }: SpinnerProps = $props()\n</script>\n\n<Loader2\n  data-uipkge=\"\"\n  data-slot=\"spinner\"\n  class={cn(spinnerVariants({ size }), className as string | undefined)}\n  aria-label=\"Loading\"\n  role=\"status\"\n  {...restProps}\n/>\n",
      "type": "registry:ui",
      "target": "~/src/lib/components/ui/spinner/Spinner.svelte"
    },
    {
      "path": "packages/registry-svelte/components/spinner/spinner.variants.ts",
      "content": "import type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\n/**\n * Variant definitions live in their own file (rather than the package\n * `index.ts`) so consuming Vue SFCs can import without creating a circular\n * dependency through the index. See card.variants.ts for the canonical\n * example + the SSR symptom that motivated the split.\n */\n\n// motion-safe: honor prefers-reduced-motion (static glyph when reduced).\nexport const spinnerVariants = cva('motion-safe:animate-spin text-muted-foreground', {\n  variants: {\n    size: {\n      default: 'size-6',\n      sm: 'size-4',\n      lg: 'size-8',\n      icon: 'size-4',\n    },\n  },\n  defaultVariants: {\n    size: 'default',\n  },\n})\n\nexport type SpinnerVariants = VariantProps<typeof spinnerVariants>\n",
      "type": "registry:ui",
      "target": "~/src/lib/components/ui/spinner/spinner.variants.ts"
    },
    {
      "path": "packages/registry-svelte/components/spinner/index.ts",
      "content": "export { default as Spinner, type SpinnerProps } from './Spinner.svelte'\nexport { spinnerVariants, type SpinnerVariants } from './spinner.variants'\n",
      "type": "registry:ui",
      "target": "~/src/lib/components/ui/spinner/index.ts"
    }
  ],
  "dependencies": [
    "@lucide/svelte",
    "class-variance-authority"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "description": "Lightweight loading indicator — circular spinner with three sizes and tone variants. Use inside buttons (replacing the icon when an action is in flight) or as a centered page loader.",
  "categories": [
    "feedback"
  ]
}