Desk booking

A React block (a whole screen) in Beamline's Events & bookings app.

Desks in an office for the people who book them and the admin who sets how far ahead. Your days over the next weeks: booked with a desk, free to book, past, not open yet (beyond the booking window), or kept beyond it because they were booked before it shrank. The chosen day's floor plan draws neighbourhoods as zones in their hues and desks as yours, free, taken or chosen; filter by floor and neighbourhood, say when none are free, and change desk with the day still booked; if the desk was taken meanwhile the old desk stays and it's said. The booking window is no limit or up to a number of office days; its preview shows the last bookable day and how many existing bookings are already beyond it, which stay booked while new ones are refused; a failed save keeps the window in force.

Use it for

  • Hot-desk booking with a floor plan by neighbourhood.
  • An admin setting how far ahead desks can be booked without cancelling existing bookings.

Not for

Anatomy

  • bar: the office, the booking window in words and the time zone; My desk or Booking window for admins
  • your days: weekdays over the next weeks with the desk, free, not open yet (hatched), kept beyond the window, today marked, the chosen day ringed
  • plan: the day, your desk with neighbourhood and floor, floor choice, neighbourhood chips with free counts, zones and desks on the plan, a legend, the move (old → new with neighbourhood, floor and features) and Change desk or Book
  • booking window: No limit or Up to, how far ahead, the last bookable day, bookings already beyond it kept, Save window, and the days as people will see them

States

  • current assignment, filtered by floor or neighbourhood, no desks free, replacement chosen, desk taken meanwhile (old desk kept), changed
  • booking window unlimited or bounded, past day, beyond the window, existing booking beyond the new limit (kept), save failed
  • narrow room: days above the plan

Keyboard

  • Tab reaches each day and each free desk; Enter or Space picks it

Motion

Desks and zones ease their colour and dimming when filtered or chosen. Nothing runs at rest.

Props

PropTypeDefaultDescription
office (required)string—The office's name and time zone label ("Lisbon office", "Lisbon time").
timezoneLabel (required)string—
floors (required)Floor[]—
desks (required)Desk[]—
reservationsReservation[]—
defaultReservationsReservation[]—
onReservationsChange((reservations: Reservation[]) => void)—
taken (required)Record<string, string[]>—Desks others have taken, per day.
horizonBookingHorizon—
defaultHorizonBookingHorizon—
onHorizonChange((horizon: BookingHorizon) => void)—
today (required)string—Today in the office, ISO yyyy-mm-dd.
canManageboolean—May set the booking window.
weeksnumber—How many weeks of days to show. Default 5.
defaultDaystring—
defaultView"desk" | "window"—
onChangeDesk((reservation: Reservation, deskId: string) => Promise<unknown>)—Moves a booking to another desk; reject when the desk was taken meanwhile (the old desk stays).
onBook((day: string, deskId: string) => Promise<Reservation>)—Books a day at a desk; resolve with the reservation.
onSaveHorizon((horizon: BookingHorizon) => Promise<unknown>)—Saves the booking window; reject to keep the one in force.
localestring—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.
defaultDeskstring—A desk already chosen on the first day shown (a change in progress).

Built from

Dependencies

lucide-react

Import

import { DeskBooking } from "@beamline/desk-booking";

Get it

Desk booking is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Events & bookings

  • Team calendar: A team's schedule: the people and shared calendars to show (each its colour), a month to jump by, who is out this week, and the week, day or month of…
  • Day agenda: One person's days with notes, tasks and calendar events side by side, each kept as what it is. A task's scheduled day, deadline, reminder and repeat are…
  • Crew booking: Booking crew for a project: each person with a strip of the project's days, days in the same state joined into one run said once (booked solid, available…
  • Resource booking: Booking something shared (a room, a van, a camera kit). Choose what, then either a free hour on a day: a grid of starts the app says are free (a taken…
  • Resource rules: Each person's scheduling rules beside their day, the day board leading: role, available (an unavailable day filled in the danger tint and said, a job…
  • Linked appointments: A drop-off and a pickup kept as one linked pair on the week's calendar (the shared event calendar, day view on a phone), with the car's stay drawn…
  • Waitlist desk: A front desk's waitlist beside the day's book: who is waiting (filters as chips, the queue's count apart from the day's), the day's bookings and the…
  • Visitor desk: An office front desk's visitors. Invite a meeting's guests from the calendar: colleagues are shown but never invited, guests without an email are said…
  • Issued ticket: One issued event ticket at the door, led by the ticket itself: what it admits to (event and venue), when, the section, seat and who it admits, and its…
  • Itinerary: A trip's days where every event says who sees it, in words: everyone, only Ana and Ben, or hidden from Leo. The same rules give each traveller their own…
  • Trip budget: A trip's money against its plan, in the trip's own currency. The budget (set or changed in place; a refused save keeps what was typed), what's spent and…
  • Proposal payments: A travel proposal's money from the agent's side to the client's. Pricing: the price rule (markup on supplier cost, a fixed price, or net), what the…
  • Project periods: A project's time periods (build, show, teardown) on one time scale, the thing being planned: each period a bar across its days with the crew and gear…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.