Skip to content
Forms

TimeDial

A brass pocket watch that is also a time field. Drag either hand; the minute hand carries the hour past twelve, and a painted sky turns behind the arch so the sun comes up and the moon comes out with the hours. Arrow keys move each hand.

Download
  • React
  • Tailwind CSS v4
  • motion

Props

NameTypeDefaultWhat it does
labelstring"Time"Read out by screen readers.
valuestring-Controlled time, "HH:MM" in 24 hours.
defaultValuestring"10:10"Uncontrolled start time, "HH:MM" in 24 hours.
stepnumber5Minutes moved by one drag step or arrow key.
onChange(time: string) => void-Called with "HH:MM" in 24 hours, like a time input.
namestring-Form field name. Sends "HH:MM" in 24 hours.
classNamestring"w-full max-w-xs"Set the width here. Everything scales with it.