Calm motion: animations on this site only fade, with no movement
Slot picker
The free times of a day, as buttons to pick one
Shows the times that are free for a booking, for example a call, so a person picks one with a click. Put a calendar before it to pick the day. For a free time of any length, use the time picker.
Basic
Pick a time for the call.
slotsis a list of times asHH:MMtexts (24 hours), or of{ time, disabled }. A slot withdisabledis taken: it shows with a line through it, but a person cannot pick it.- The times are sorted and put in three groups: morning (before 12:00), afternoon (before 17:00), and evening. A group with no times does not show.
v-modelis the picked time as anHH:MMtext, ornull.localeshows the times in the format of a language, for exampleenfor "1:30 PM". With no locale, the times show as13:30.- Each slot is a native radio button, so the arrow keys move between the times, and screen readers say each group and the picked time.
disabledturns all slots off. - With no slots, the picker says that there are no free times.
- Change the words with
labelsor a label pack:morning,afternoon,evening, andnone.
Usage
ts
import { BlessSlotPicker, type BlessSlot } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
slots* | (string | BlessSlot)[] | — | |
locale | string | — | shows the times in the format of this locale, for example `en` for 9:30 AM |
disabled | boolean | — | |
labels | Partial<{ morning: string; afternoon: string; evening: string; none: string; }> | — | |
modelValue | string | null | null | the picked time, `HH:MM` |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | null] |