{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "slider", "files": [ { "path": "registry/radix-luma/ui/slider.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Slider as SliderPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/registry/radix-luma/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n \n \n \n \n {Array.from({ length: _values.length }, (_, index) => (\n \n ))}\n \n )\n}\n\nexport { Slider }\n", "type": "registry:ui" } ], "meta": { "links": { "docs": "https://ui.shadcn.com/docs/components/radix/slider", "examples": "https://raw.githubusercontent.com/shadcn-ui/ui/refs/heads/main/apps/v4/registry/bases/radix/examples/slider-example.tsx", "api": "https://www.radix-ui.com/docs/primitives/components/slider.md" } }, "type": "registry:ui" }