Skip to content
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
Rooms and times
Room08:0009:0010:0011:0012:0013:0014:0015:0016:00
Kenanga4 seatsDesign review09:00–10:001:114:00–14:30
Melati8 seatsSales weekly10:30–12:00
Anggrek16 seatsAll hands13:00–15:00
Pick a free time.
  • rooms is the list of rooms, each with an id, a name, and optional seats.
  • bookings is the list of booked times. Each has a room, a start and an end as "HH:MM", and an optional title.
  • from and to are 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-model is the picked time. The status line says it in words. Book emits book with it, and you add it to bookings.
  • 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 labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessRoomBooking } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
rooms*BlessMeetingRoom[]—
bookingsBlessRoomSlot[][]
fromnumber8the first and the last hour of the day, as whole hours
tonumber18
labelsPartial<{ 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; }>—
modelValueBlessRoomSlot | nullnullthe time that the person picks; a second click later in the same room makes it longer

Events

NamePayloadDescription
update:modelValue[value: BlessRoomSlot | null]
book[slot: BlessRoomSlot]

Released under the MIT License. Character names and artwork belong to their owners.