Calm motion: animations on this site only fade, with no movement
Room booking
The rooms and the hours of one day, with the booked times and a free time to pick
Lets people find a free meeting room and book it. For the events of a person over many days, use the scheduler.
Basic
| Room | 08:00 | 09:00 | 10:00 | 11:00 | 12:00 | 13:00 | 14:00 | 15:00 | 16:00 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Kenanga4 seats | Design review09:00–10:00 | 1:114:00–14:30 | ||||||||||||||||
| Melati8 seats | Sales weekly10:30–12:00 | |||||||||||||||||
| Anggrek16 seats | All hands13:00–15:00 | |||||||||||||||||
Pick a free time.
roomsis the list of rooms, each with anid, aname, and optionalseats.bookingsis the list of booked times. Each has aroom, astartand anendas "HH:MM", and an optionaltitle.fromandtoare the first and the last hour of the day (default 8 and 18). Each cell is 30 minutes.- A booked time fills its cells with stripes and its title. A free cell is a button with the room and the time in its name.
- Click a free cell to pick it. Click a later cell in the same room to make the time longer. If a booking is in between, the click starts a new pick.
v-modelis the picked time. The status line says it in words. Book emitsbookwith it, and you add it tobookings.- On a narrow screen, the table scrolls sideways. The scroll area takes the focus, so you can scroll it with the keyboard.
- Change the words with
labelsor a label pack. The API table lists the keys.
Usage
ts
import { BlessRoomBooking } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
rooms* | BlessMeetingRoom[] | — | |
bookings | BlessRoomSlot[] | [] | |
from | number | 8 | the first and the last hour of the day, as whole hours |
to | number | 18 | |
labels | Partial<{ caption: string; room: string; seats: (n: number) => string; free: (room: string, time: string) => string; busy: string; pick: string; chosen: (room: string, start: string, end: string) => string; book: string; }> | — | |
modelValue | BlessRoomSlot | null | null | the time that the person picks; a second click later in the same room makes it longer |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: BlessRoomSlot | null] | |
book | [slot: BlessRoomSlot] |