Time Slot Picker
Pick from the times somebody else has said are free: the offered slots arranged under the day they fall on, in a stated time zone, with the ones already taken still on show and the choice checked against the latest availability rather than assumed to still hold. Reach for it on any screen where a person picks a time out of what is left — booking an appointment, consultation or viewing; scheduling an interview, screening call or demo; a clinic, dentist, vet or salon; a delivery, collection or installation window; a meeting room, court, pitch, studio or piece of equipment; a test drive, fitting or tasting; a tutoring or coaching session; an exam, test centre or vaccination slot; a callback window on a support form; and the second step of every “pick a date, then pick a time” flow. Common asks it answers: “time slot picker react”, “appointment time picker react”, “booking slot component react”, “availability picker react”, “available times grid react”, “slot picker from api”, “shadcn time slot picker”, “shadcn booking component”, “shadcn appointment picker”, “calendly style time picker react”, “cal.com slot picker alternative”, “react time slot selection component”, “choose a time from available slots”, “timezone aware time slot picker”, “booking shows the wrong time timezone”, “slots grouped by day in the wrong timezone”, “utc slot appears on the previous day”, “slot one hour out daylight saving”, “duplicate 1:30 when the clocks go back”, “two slots show the same time dst”, “slot taken while user was booking”, “selected slot no longer available react”, “optimistic booking conflict ui”, “stale availability selected slot”, “disable booked time slots react”, “grey out unavailable times”, “no availability message booking ui”, “fully booked day message”, “empty day no slots ui”, “minimum notice period booking”, “lead time before booking react”, “hide past time slots today”, “date now hydration mismatch react”, “accessible time slot picker”, “listbox roving tabindex react”, “aria-selected time slot buttons”, “keyboard navigation time slots”, “予約 時間枠 選択 react”, “空き時間 選択 ui”, “予約枠 コンポーネント”, “タイムゾーン 予約 時刻 ずれ”, “枠が埋まった 表示”, “受付時間 選択 フォーム”, “面談 日程 時間 選択”. Official shadcn/ui has nothing of the kind, measured today rather than remembered. Fetching every entry in its registry — 65 listed, 62 fetchable, code-block, questionnaire and trace 404 on both style tracks — and searching all 223,287 bytes of files[].content, availability, booking, appointment, timeSlot, reserve, unavailable, capacity, waitlist and timezone are every one of them a zero hit. slot is not zero and is worth unfolding rather than rounding: it returns 444, and all 444 are shadcn's own data-slot mechanism — 386 the literal attribute, 58 more inside Tailwind variants such as has-data-[slot=alert-dialog-media] that select on it. Not one is a time slot. Its calendar is a react-day-picker wrapper that picks a day and has no notion of what is free within one. The decision everything else follows from: a slot is an instant, and the display zone is a separate, stated thing. Pass start with its offset and the component places it; the zone it shows the times in is a prop, defaults to the runtime's, and is printed under the picker, because the failure this component exists to prevent is a person turning up an hour out while every screen they saw looked right. Which calendar day a slot belongs to is then worked out in that zone and not in UTC — 23:30 UTC is half past eight the next morning in Tokyo, so grouping on the UTC date files it under a heading a day too early. The day key is built with a locale pinned to the Gregorian calendar and Latin digits, which is not fussiness: asked for the year of this instant, th-TH answers 2569, ja-JP-u-ca-japanese answers 8, ar-EG answers it in Arabic-Indic digits and fa-IR answers 1405-08-29, a different day of a different month. A timestamp that arrives without an offset is read in the display zone rather than on the machine, and reported. Date.parse has two different rules for the two offset-less forms — a date-time such as "2026-11-20T09:00" is read as machine-local, a date alone as UTC — so a server rendering this page and the browser that hydrates it disagree about the same string, which is a hydration mismatch that only shows up for people in other countries. slotIssues names it, along with an unreadable start, an end at or before its start, two slots sharing an id, and two bookable slots over the same time. Twice a year two different slots read exactly alike, and it is measured rather than imagined: 05:30 and 06:30 UTC on 1 November 2026 both format as “1:30 AM” in New York, because that hour comes round twice and both halves of it are ordinary bookable slots. Where two labels on a day collide the zone abbreviation goes on the ones that collide — EDT beside EST — and nowhere else. The other half is that availability is already out of date by the time it is read. A slot that was free when the page rendered is taken by somebody else a moment later, and the tick on screen then points at something that does not exist. Keeping it posts a booking the server will refuse; clearing it quietly loses the person's answer with nothing said. So the selection is reconciled against the latest slots on every render: what has gone comes out of the value, is named in a notice with its day as well as its time, is handed to onLostSelection, and — the part that actually matters — is left out of the hidden inputs, so a form never posts a slot somebody else holds. A taken slot stays in the list, reachable, marked aria-disabled rather than with the disabled attribute and carrying its reason, because “what about nine o'clock” and “there is nothing at nine” are different questions and only a slot that is still there can answer the first. A day with nothing to offer gets one of four sentences rather than a blank, and they are not interchangeable: no times at all, fully booked, these have passed, or nothing anywhere. A day whose times have all been and gone says so even when some of them had also been booked, because “fully booked” would tell the reader a cancellation might free one and nothing can. Past slots are hidden by default but the day's state is computed from what was offered, so a day emptied by that filter still says why it is empty instead of reporting itself as having nothing. And now is a prop, not a clock reading: a component that calls Date.now() renders one thing on the server and another in the browser a moment later, and can never be tested twice with the same answer. Left out, nothing is past and nothing is too soon. Three smaller things that each hide a real difference when they go the other way. A day that mixes lengths shows every slot as a range, because “9:00” and “9:00” are the half hour and the hour that start at the same minute; a day of one length shows start times, with the range still in the accessible name. A slot that ends at midnight stays on the day it started, since a slot runs up to its end and not through it, and reading the boundary itself files the last half hour of every day under tomorrow. And the whole list is one tab stop: a week of half hours is eighty tab presses otherwise, so it is a listbox with a roving tabindex, each day a group named by its heading, left and right walking the slots in time order and running on into the next day, up and down jumping a whole day over the ones with nothing on them, Home and End to the ends, and movement clamping rather than wrapping. Within this registry the neighbours are each the other way round or another grain: weekly-hours sets the opening times a business decides, where this picks from what is left of them; time-input types a time into a field; recurrence-input edits how often something repeats; date-range-preset picks a period to look at; month-picker and calendar-heatmap work a coarser grain; timezone-select chooses a zone rather than displaying in one; duration-input measures a length. None of them offers a set of times to choose between. The API: slots is { id?, start, end?, durationMinutes?, taken?, note?, reason? }[] and is required, because availability is the server's answer and a component that invented a grid of half hours would be offering times nobody can have; days lists calendar dates to show even when empty, which is the only way a day with nothing free can be shown at all; value and onValueChange make it controlled, or defaultValue uncontrolled, with multiple and max for more than one; timeZone, locale, hour12, dayFormat and a full labels object cover the display, and now, minLeadMinutes, hidePastSlots and defaultDurationMinutes cover what is bookable; name posts the surviving ids through a plain form or a server action. The hard parts are exported as pure functions so a confirmation screen, a reminder email, a server route or a test can have the same answers without mounting anything: resolveTimeSlots, reconcileSlotSelection, toggleSlotSelection, slotIssues, nextAvailableSlot and nextSlotFocus. Styled entirely with shadcn tokens (primary, primary-foreground, input, background, accent, accent-foreground, border, muted-foreground, destructive, ring) so it follows light and dark mode, and it ships zero npm dependencies — no date library, no time-zone library, no icon package.
Installation
Requires @pulld in the registries of your components.json (shadcn adds official directory namespaces automatically).
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Time Slot Picker" component (pulld/time-slot-picker) from its shadcn registry.1. Install it with: npx shadcn@latest add @pulld/time-slot-picker2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.Files & dependencies
- registry/ui/time-slot-picker.tsx
Looks similar, elsewhere
There is no screenshot of this item to compare yet.