ComponentsInputs & forms
Clock Face Picker
Pick a time by dragging the hands of an analogue clock, with the time shown digitally above and an AM/PM switch for 12-hour use.
"use client";
import { Time } from "@internationalized/date";
import { useState } from "react";
import { ClockFacePicker } from "@/components/miyuki-ui/clock-face-picker";
export default function ClockFacePickerDemo() {
const [time, setTime] = useState(new Time(8, 30));
return (
<div className="flex flex-col items-center gap-3">
<ClockFacePicker label="First lift" value={time} onChange={setTime} hourCycle={12} />
<p className="text-[13px] text-muted-foreground">Lifts run every ten minutes until 16:30.</p>
</div>
);
}Install
npx shadcn@latest add @miyuki-ui/clock-face-pickerThis needs the @miyuki-ui registry in your components.json. See Using the shadcn CLI.
Props
ClockFacePicker
Prop
Type