TimePicker (slots in a popover) and TimeInput (typed), on a 24-hour "HH:mm" value.
Time picker slots
Install
npx shadcn add @syncrobotic/time-picker Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/field, @syncrobotic/popover
Overview
Two ways to enter a time: TimePicker picks from a grid of slots, TimeInput reads what is typed (930, 9:30, 21.30, 9:30 pm).
When to use
- Schedules, quiet hours and charging windows.
- Opening-hour slots with some taken.
- Fast entry for people who know the time.
Use something else
- A date: Date selector.
- A duration: Number field with a unit.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Time picker quarter hours
Time picker opening hours
Time picker twelve hour
Time input typed
Time input range
Time input bounded
Usage rules
- Values are "HH:mm" on a 24-hour clock; hour12 only changes how they read.
- Taken slots stay in the list, struck through.
Changelog
- 0.23.32026-11-21A value that is not a time ("9", "9:", "25:99", "") reads as no value: the placeholder shows and no slot is picked, instead of a broken time on the trigger. An unpadded "9:30" picks the "09:30" slot; a malformed min, max or step falls back to its default. New
normalizeTime. - 0.23.22026-11-21Compiles with noUncheckedIndexedAccess, as strict products build it; behaviour unchanged.
- 0.23.12026-11-21TimeInput rewrites its text for a new value or clock in the render that brings it instead of an effect later, so it is safe under the React Compiler.