ComponentsInputs & forms
Slider
A slider for a single value or a range, with a value bubble while dragging and optional tick marks.
Single value
"use client";
import { Slider } from "@/components/miyuki-ui/slider";
export default function SliderDemo() {
return (
<Slider
className="max-w-sm"
label="Elevation"
minValue={0}
maxValue={3000}
step={50}
defaultValue={1650}
formatOptions={{ style: "unit", unit: "meter" }}
marks={[0, 500, 1000, 1500, 2000, 2500, 3000]}
/>
);
}Range
"use client";
import { Slider } from "@/components/miyuki-ui/slider";
export default function SliderRangeDemo() {
return (
<Slider
className="max-w-sm"
label="Budget per night"
minValue={4000}
maxValue={40000}
step={500}
defaultValue={[8000, 24000]}
formatOptions={{ style: "currency", currency: "JPY" }}
/>
);
}Install
npx shadcn@latest add @miyuki-ui/sliderThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
Slider
Prop
Type
Signature Pad
A paper area you sign with a brush: ink thickens when you slow down, thins when you hurry and bleeds a little where each stroke begins. A Type instead switch lets anyone without a pointer type their name, set in a script hand.
Snowdrift Input
A pill search field with rotating placeholders whose text blows away like drifting snow when submitted.