{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "meter",
  "type": "registry:ui",
  "title": "Meter",
  "description": "A horizontal gauge bar using role meter with aria value attributes, an optional label and a fill clamped to 100 percent. For storage, quota and usage limits.",
  "dependencies": [],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/meter.tsx",
      "type": "registry:ui",
      "target": "components/ui/meter.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Meter({\n  value,\n  max = 100,\n  label,\n  className,\n}: {\n  value: number\n  max?: number\n  label?: string\n  className?: string\n}) {\n  const pct = max <= 0 ? 0 : Math.min(100, Math.round((value / max) * 100))\n  return (\n    <div data-slot=\"meter\" className={cn(\"space-y-1\", className)}>\n      {label ? <p className=\"text-xs text-fg-muted\">{label}</p> : null}\n      <div\n        role=\"meter\"\n        aria-label={label ?? \"Meter\"}\n        aria-valuenow={value}\n        aria-valuemin={0}\n        aria-valuemax={max}\n        className=\"h-2 overflow-hidden rounded-full bg-sunken\"\n      >\n        <div className=\"h-full bg-accent\" style={{ width: `${pct}%` }} />\n      </div>\n    </div>\n  )\n}\nexport { Meter }\n"
    }
  ]
}
