{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "Progress",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "A Radix progress bar with clamped values, optional percentage text, and a reduced-motion-safe pending state.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/progress.tsx",
      "content": "// Ballmac UI: Progress. https://ui.ballmac.com/components/progress\n// Based on shadcn/ui Progress (MIT, Copyright (c) 2023 shadcn), adding a labeled value and reduced-motion-safe indeterminate state.\nimport * as React from \"react\"\nimport { Progress as ProgressPrimitive } from \"radix-ui\"\nimport { cn } from \"@/lib/utils\"\n\ntype ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & {\n  /** Show the value in a label below the bar. */\n  showValue?: boolean\n}\nfunction Progress({\n  className,\n  value,\n  max = 100,\n  showValue = false,\n  ...props\n}: ProgressProps) {\n  const safeMax = Number.isFinite(max) && max > 0 ? max : 100\n  const safeValue = value == null ? null : Math.max(0, Math.min(safeMax, value))\n  const percent =\n    safeValue == null ? null : Math.round((safeValue / safeMax) * 100)\n  return (\n    <div data-slot=\"progress-group\" className={cn(\"w-full\", className)}>\n      <ProgressPrimitive.Root\n        data-slot=\"progress\"\n        value={safeValue}\n        max={safeMax}\n        className=\"bg-muted relative h-2 w-full overflow-hidden rounded-full\"\n        {...props}\n      >\n        <ProgressPrimitive.Indicator\n          data-slot=\"progress-indicator\"\n          className={cn(\n            \"bg-primary block h-full rounded-full transition-[width] duration-200 motion-reduce:transition-none\",\n            percent == null &&\n              \"w-1/3 motion-safe:animate-pulse motion-reduce:w-full\",\n          )}\n          style={percent == null ? undefined : { width: `${percent}%` }}\n        />\n      </ProgressPrimitive.Root>\n      {showValue && (\n        <span\n          data-slot=\"progress-value\"\n          className=\"text-muted-foreground mt-2 block text-end text-xs tabular-nums\"\n        >\n          {percent == null ? \"In progress\" : `${percent}%`}\n        </span>\n      )}\n    </div>\n  )\n}\nexport { Progress, type ProgressProps }\n",
      "type": "registry:ui",
      "target": "@components/ballmac/progress.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "loading",
      "progress",
      "status"
    ],
    "version": "1.0.0",
    "updated": "2026-09-29",
    "ai": {
      "summary": "A Radix progress bar with clamped values, optional percentage text, and a reduced-motion-safe pending state.",
      "whenToUse": [
        "Show completion of a bounded task",
        "Show work in progress when completion is unknown"
      ],
      "whenNotToUse": [
        "Use a spinner for very short waits"
      ],
      "composesWith": [
        "spinner"
      ],
      "a11y": [],
      "customization": [
        "value: current value or null for indeterminate",
        "showValue: display percentage"
      ]
    },
    "source": {
      "name": "shadcn/ui Progress",
      "url": "https://github.com/shadcn-ui/ui",
      "license": "MIT",
      "copyright": "Copyright (c) 2023 shadcn",
      "modified": true
    },
    "examples": [
      "progress-demo",
      "progress-states"
    ],
    "url": "https://ui.ballmac.com/components/progress"
  },
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}