About
A draggable range input for picking a numeric value (or range) between a min and max, with optional label, live value display, marks, and small/medium/large sizes.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Slider to your project and fits it to your theme.
Code
How Slider is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { Slider } from "@/components/ui/slider";
export default function SliderSizesDemo() {
return (
<div className="w-full max-w-sm p-8 flex items-center justify-center min-h-[200px] bg-background">
<div className="flex flex-col gap-6 w-full">
<Slider defaultValue={[30]} max={100} size="sm" label="Small" />
<Slider defaultValue={[50]} max={100} size="md" label="Medium" />
<Slider defaultValue={[70]} max={100} size="lg" label="Large" />
</div>
</div>
);
}








