{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "description": "The bare material with its optics as props: refraction, frost, veil and bezel.",
  "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 { useLiquefyConfig } from '@/lib/provider'\nimport { useLiquidStyles, type LiquidCustomProperties, type LiquidStyleProps } from '@/lib/styles-prop'\nimport { useLiquidGlass } from '@/hooks/use-liquid-glass'\n\nexport type LiquidGlassProps = HTMLAttributes<HTMLDivElement> & LiquidStyleProps & {\n  /** Width of the refracting band at the rim, in pixels. Defaults to 22% of the short side. */\n  bezel?: number\n  children?: ReactNode\n  /** Exponent of the bezel cross-section: 1 is an even ramp, higher piles the bend against the rim. */\n  curve?: number\n  /** Backdrop blur, in pixels. What frosted glass actually is. */\n  frost?: number\n  /** Lit rim glow that follows the pointer. Falls back to the provider. */\n  glow?: boolean\n  interactive?: boolean\n  /** Dims the glass for a surface sitting on a bright backdrop. */\n  overLight?: boolean\n  padding?: number | string\n  radius?: number | string\n  /** How much of the bend the material can take without folding to spend, 0 to 1. */\n  refraction?: number\n  /** Ring that travels out from a press. Falls back to the provider. */\n  ripple?: boolean\n  /** How much the glass lifts the colour of what it refracts. */\n  saturation?: number\n  /** Colour in the rim — iridescence while wobbling, a red/green/blue split at rest. Falls back to the provider. */\n  shimmer?: boolean\n  /** How far the lens softens what it refracts, in pixels. Not the backdrop blur — that is `frost`. */\n  softness?: number\n  /** Drifting specular glints across the face. Falls back to the provider. */\n  sparkle?: boolean\n  tint?: string\n  /** How much of the material's own dressing sits over the backdrop, 1 to 0. */\n  veil?: number\n  wobbliness?: number\n}\n\n/**\n * The material on its own, with the optics exposed as props.\n *\n * `LiquidSurface` is the one to reach for in a product: it takes its whole\n * configuration from the provider. This one is for when the glass *is* the\n * design — refraction, frost and the bezel are set per instance.\n *\n * Every one of those props is optional and falls back to the provider, so a\n * bare `<LiquidGlass>` is the house material rather than a stripped-down\n * variant of it. Naming a prop is how an instance departs from the default,\n * which is the only thing that should need saying out loud.\n */\nexport const LiquidGlass = forwardRef<HTMLDivElement, LiquidGlassProps>(({\n  bezel,\n  children,\n  className,\n  curve,\n  frost,\n  glow,\n  interactive = true,\n  overLight = false,\n  padding,\n  radius,\n  refraction,\n  ripple,\n  saturation,\n  shimmer,\n  softness,\n  sparkle,\n  style,\n  styles,\n  tint,\n  veil,\n  wobbliness,\n  ...props\n}, forwardedRef) => {\n  const config = useLiquefyConfig()\n  const resolvedTint = tint ?? config.tint\n  const resolvedGlow = glow ?? config.glow\n  const resolvedRipple = ripple ?? config.ripple\n  const resolvedShimmer = shimmer ?? config.shimmer\n  const resolvedSparkle = sparkle ?? config.sparkle\n  // With every ornament off there is nothing for the shader to draw, so the\n  // canvas — and the WebGL context behind it — is not mounted at all.\n  const hasOrnaments = resolvedGlow || resolvedRipple || resolvedShimmer || resolvedSparkle\n  const resolvedWebgl = config.webgl && hasOrnaments\n\n  const [elementRef, canvasRef] = useLiquidGlass(forwardedRef, {\n    bezel,\n    curve,\n    disabled: !interactive,\n    glow: resolvedGlow,\n    intensity: config.intensity,\n    lens: config.lens && config.transparency,\n    lensBlur: softness,\n    lensStrength: refraction ?? config.refraction,\n    motion: config.motion,\n    ripple: resolvedRipple,\n    saturation,\n    shimmer: resolvedShimmer,\n    sparkle: resolvedSparkle,\n    tint: resolvedTint,\n    webgl: resolvedWebgl,\n    wobbliness: wobbliness ?? config.wobbliness,\n  })\n\n  const vars: LiquidCustomProperties = {\n    '--lq-local-intensity': config.intensity,\n    '--lq-radius': typeof radius === 'number' ? `${radius}px` : radius ?? 'var(--lq-radius-default)',\n    '--lq-tint': resolvedTint,\n  }\n  if (padding !== undefined) {\n    vars['--lq-glass-padding'] = typeof padding === 'number' ? `${padding}px` : padding\n  }\n  // Set outright rather than added to the provider's, because a component that\n  // names its own frost is saying what it wants to be, not how much more than\n  // everything else.\n  if (frost !== undefined) vars['--lq-blur'] = `${frost}px`\n  if (veil !== undefined) vars['--lq-veil'] = veil\n  const root = useLiquidStyles(['lq-surface', 'lq-glass'], { className, style, styles, vars })\n\n  return (\n    <div\n      className={root.className}\n      data-liquid-interactive={interactive}\n      data-liquid-over-light={overLight}\n      data-liquid-variant=\"clear\"\n      ref={elementRef}\n      style={root.style}\n      {...props}\n    >\n      <span aria-hidden=\"true\" className=\"lq-surface__edge\" />\n      {resolvedWebgl && <canvas aria-hidden=\"true\" className=\"lq-surface__shader\" ref={canvasRef} />}\n      <span className=\"lq-surface__content\">{children}</span>\n    </div>\n  )\n})\n\nLiquidGlass.displayName = 'LiquidGlass'\n",
      "path": "registry/liquid-glass.tsx",
      "type": "registry:ui"
    }
  ],
  "name": "liquid-glass",
  "registryDependencies": [
    "https://liquefy-ui.com/r/liquefy-ui.json",
    "https://liquefy-ui.com/r/provider.json",
    "https://liquefy-ui.com/r/styles-prop.json",
    "https://liquefy-ui.com/r/use-liquid-glass.json"
  ],
  "title": "LiquidGlass",
  "type": "registry:ui"
}
