{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "description": "A ring meter with the reading in its middle, for levels like memory or disk in use.",
  "docs": "Two steps after installing: import the copied stylesheet once at your app entry — it lands at `styles/liquefy-ui.css` — or `@import` it from your global CSS *before* `tailwindcss`, so Tailwind utilities keep winning over component styles. Then wrap the tree in `<LiquefyProvider>`, which is where every component reads its tokens from. Every copied file already carries its own 'use client' directive. Full documentation: https://liquefy-ui.com/#/docs/installation",
  "files": [
    {
      "content": "'use client'\n\nimport { forwardRef, type HTMLAttributes, type ReactNode } from 'react'\nimport { useLiquidStyles, type LiquidStyleProps } from '@/lib/styles-prop'\n\nexport type LiquidGaugeProps = Omit<HTMLAttributes<HTMLSpanElement>, 'children'> & LiquidStyleProps & {\n  /** What is being measured. Required: a gauge with no name is just a ring. */\n  label: string\n  /** Current reading, from 0 to `max`. Out-of-range values are clamped. */\n  value: number\n  max?: number\n  /** Rendered diameter in pixels. */\n  size?: number\n  /** Stroke width of the ring, on the same 24-unit scale as LiquidSpinner. */\n  thickness?: number\n  tint?: string\n  /** Replaces the percentage in the middle — a byte count, a temperature, an icon. */\n  children?: ReactNode\n}\n\nexport const LiquidGauge = forwardRef<HTMLSpanElement, LiquidGaugeProps>(({\n  children,\n  className,\n  label,\n  max = 100,\n  size = 88,\n  style,\n  styles,\n  thickness = 2.4,\n  tint,\n  value,\n  ...props\n}, ref) => {\n  const ratio = max > 0 ? Math.min(1, Math.max(0, value / max)) : 0\n  const percent = Math.round(ratio * 100)\n  const radius = (24 - thickness) / 2\n  const root = useLiquidStyles('lq-gauge', {\n    className,\n    style,\n    styles,\n    vars: { '--lq-gauge-size': `${size}px`, ...(tint ? { '--lq-gauge-tint': tint } : {}) },\n  })\n\n  // A meter rather than a progressbar: this is a level (memory in use, a disk\n  // filling up), not a task heading for done. The arc starts at twelve o'clock,\n  // where a reader looks for zero, and pathLength keeps the dash in percent at\n  // any radius.\n  return (\n    <span\n      aria-label={label}\n      aria-valuemax={max}\n      aria-valuemin={0}\n      aria-valuenow={ratio * max}\n      aria-valuetext={`${percent}%`}\n      className={root.className}\n      ref={ref}\n      role=\"meter\"\n      style={root.style}\n      {...props}\n    >\n      <svg aria-hidden=\"true\" className=\"lq-gauge__ring\" fill=\"none\" height={size} viewBox=\"0 0 24 24\" width={size}>\n        <circle className=\"lq-gauge__track\" cx=\"12\" cy=\"12\" r={radius} strokeWidth={thickness} />\n        {/* A round cap draws a dot even at a zero-length dash, so an empty gauge leaves the arc out. */}\n        {percent > 0 && (\n          <circle\n            className=\"lq-gauge__arc\"\n            cx=\"12\"\n            cy=\"12\"\n            pathLength={100}\n            r={radius}\n            strokeDasharray={`${percent} 100`}\n            strokeLinecap=\"round\"\n            strokeWidth={thickness}\n            transform=\"rotate(-90 12 12)\"\n          />\n        )}\n      </svg>\n      <span aria-hidden=\"true\" className=\"lq-gauge__value\">\n        {children ?? <>{percent}<small>%</small></>}\n      </span>\n    </span>\n  )\n})\n\nLiquidGauge.displayName = 'LiquidGauge'\n",
      "path": "registry/liquid-gauge.tsx",
      "type": "registry:ui"
    }
  ],
  "name": "liquid-gauge",
  "registryDependencies": [
    "https://liquefy-ui.com/r/liquefy-ui.json",
    "https://liquefy-ui.com/r/styles-prop.json"
  ],
  "title": "LiquidGauge",
  "type": "registry:ui"
}
