Time Slot Picker

Pick available time slots with grid display

SaaSCalendar

Overview

TimeSlotPicker displays a grid of time slots with availability status (available, busy, blocked). Users can select an available slot for booking. Includes an optional legend and supports custom labels for i18n.

Usage

import { TimeSlotPicker } from "@leanicon/web-builder-library/saas";

const slots = [
  { startTime: "2026-03-25T09:00:00Z", endTime: "2026-03-25T09:30:00Z", status: "available" },
  { startTime: "2026-03-25T09:30:00Z", endTime: "2026-03-25T10:00:00Z", status: "busy" },
  { startTime: "2026-03-25T10:00:00Z", endTime: "2026-03-25T10:30:00Z", status: "available" },
];

<TimeSlotPicker
  slots={slots}
  date={new Date().toISOString()}
  onSelect={(slot) => console.log("Selected:", slot)}
/>;

Variants

Default

Friday, October 2, 2026(Today)

2 of 4 slots available

Available
Busy
Blocked
Selected

Default (Dark)

Friday, October 2, 2026(Today)

2 of 3 slots available

Available
Busy
Blocked
Selected

Loading

Friday, October 2, 2026(Today)

0 of 0 slots available

Available
Busy
Blocked
Selected
Loading time slots...

No Slots

Friday, October 2, 2026(Today)

0 of 0 slots available

Available
Busy
Blocked
Selected
No time slots available

All Busy

Friday, October 2, 2026(Today)

0 of 3 slots available

Available
Busy
Blocked
Selected

Hidden Legend

Friday, October 2, 2026(Today)

2 of 2 slots available

Custom Labels (Spanish)

Friday, October 2, 2026(Today)

1 of 2 slots available

Libre
Ocupado
Bloqueado
Seleccionado

Props

NameTypeDefaultRequiredDescription
slotsTimeSlot[]—YesAvailable time slots
valueTimeSlot | null—NoCurrently selected slot (controlled)
selectedSlotTimeSlot | null—NoAlias for value - currently selected slot
defaultValueTimeSlot | null—NoDefault selected slot (uncontrolled)
loadingbooleanfalseNoWhether picker is in loading state
disabledbooleanfalseNoWhether picker is disabled
datestring—YesDate being displayed (ISO string)
is24HourbooleanfalseNoUse 24-hour time format
slotDurationMinutesnumber30NoSlot duration in minutes (for display)
dayStartHournumber9NoStart hour of day (0-23)
dayEndHournumber17NoEnd hour of day (0-23)
columnsnumber4NoNumber of columns in grid
showLegendbooleantrueNoWhether to show the status legend
labelsTimeSlotPickerLabels—NoCustom labels for the picker UI
classNamestring—NoCustom class name
onSelect((slot: TimeSlot | null) => void)—NoCalled when a slot is selected
onDateChange((date: string) => void)—NoCalled when date changes (for navigation)