{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "range-slider",
  "type": "registry:ui",
  "title": "Range slider",
  "description": "Two-thumb range slider for picking a min and max, with value bubbles on both thumbs while dragging, optional marks, a formatter and an onValueCommitted hook.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/slider.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/range-slider.tsx",
      "type": "registry:ui",
      "target": "components/ui/range-slider.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { Slider, type SliderProps } from \"@/components/ui/slider\"\nimport { cn } from \"@/lib/utils\"\n\n/** Two-thumb slider. Both value bubbles show while either thumb is dragged. */\n\ntype RangeSliderProps = Pick<SliderProps, \"format\" | \"marks\" | \"showValue\" | \"name\" | \"minStepsBetweenValues\" | \"aria-labelledby\"> & {\n  value?: number[]\n  defaultValue?: number[]\n  onValueChange?: (value: number[]) => void\n  /** Fires once when the user releases the thumb. */\n  onValueCommitted?: (value: number[]) => void\n  min?: number\n  max?: number\n  step?: number\n  disabled?: boolean\n  className?: string\n  \"aria-label\"?: string\n}\n\nfunction RangeSlider({\n  value,\n  defaultValue = [25, 75],\n  onValueChange,\n  onValueCommitted,\n  min = 0,\n  max = 100,\n  step = 1,\n  disabled,\n  className,\n  \"aria-label\": ariaLabelProp,\n  ...props\n}: RangeSliderProps) {\n  const ariaLabel = ariaLabelProp ?? (props[\"aria-labelledby\"] ? undefined : \"Range\")\n  return (\n    <Slider\n      data-slot=\"range-slider\"\n      min={min}\n      max={max}\n      step={step}\n      disabled={disabled}\n      value={value}\n      defaultValue={defaultValue}\n      onValueChange={onValueChange ? (v) => onValueChange([...(v as readonly number[])]) : undefined}\n      onValueCommitted={onValueCommitted ? (v) => onValueCommitted([...(v as readonly number[])]) : undefined}\n      className={cn(\"w-56\", className)}\n      aria-label={ariaLabel}\n      {...props}\n    />\n  )\n}\n\nexport { RangeSlider }\nexport type { RangeSliderProps }\n"
    }
  ]
}
