LobbyDisplay
Large-screen now-serving board with one card per room, up next and recent calls, a clock, and a chime plus flash for each new call, sized from its own width.
Code
import { LobbyDisplay } from "@fadymondy/nasaq/web";<LobbyDisplay entries={queue} rooms={["1", "2", "3"]} clinic="Nasaq Family Clinic" />Bookings · beta
Live examples and controls: LobbyDisplay in the lab.
Install
npx shadcn@latest add https://docs.nasaqui.com/r/lobby-display.jsonA board for a television in the waiting room. Sizes use container queries, so it reads from across the room at 1920 pixels and still fits a phone. The board shows ticket numbers only, never names.
When to use
- A screen in the waiting room shows who is called to which room.
- Reception previews the board on a laptop.
When not to use
- A patient's own phone: use WaitingScreen.
Import
import { LobbyDisplay } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"Quick start
import { LobbyDisplay } from "@fadymondy/nasaq/web";
<LobbyDisplay entries={queue} rooms={["1", "2", "3"]} clinic="Nasaq Family Clinic" />Anatomy
LobbyDisplay data-slot="lobby-display" (@container)
├─ header clinic, clock, sound switch
├─ room cards ticket and room; a new call flashes
├─ up next the next tickets in line
├─ recent calls
└─ sr-only live region announces each new callAPI
Every div prop is passed through unless noted.
| Prop | Type | Default | Description |
|---|---|---|---|
entries | QueueEntry[] | required | The whole queue. |
rooms | string[] | required | Room or desk names, in board order. |
clinic | string | Name in the header. | |
connection | "live" | "reconnecting" | "offline" | "live" | Small indicator. |
sound, defaultSound, onSoundChange | boolean | The chime. Browsers need one click before sound can play. | |
highlightMs | number | 10000 | How long a fresh call stays highlighted. |
upNext | number | 5 | Tickets listed under Up next. |
now | number | Epoch ms for stories. | |
labels | Partial<LobbyDisplayLabels> | Override any string. |
Examples
Sound needs a click
// The operator turns sound on once. Until then the board flashes and announces silently.Accessibility
- A new call is announced through an assertive live region. The first render is silent.
- The flash respects reduced motion: the highlight stays, the pulse stops.
- Contrast is high for reading at a distance.
RTL & i18n
- The board mirrors. Tickets and the clock stay left to right.
- Strings live in a
STRINGS = { en, ar }object and any of them can be replaced withlabels. The locale comes fromNasaqProvider.
Styling & tokens
- Colours, radii and type come from
--nq-*tokens; nothing is a raw colour. Spacing and alignment use logical classes. - Target
[data-slot="lobby-display"]and the innerdata-slotparts shown in the anatomy.
Do / Don't
- Do keep the async callbacks honest: return
{ error }so the component can show the message. - Do pass
nowin tests and stories so the output stays the same. - Don't fetch inside the component: it is presentational and takes data and callbacks.
- Don't rely on colour for state: every state also has a word.
Related
Lab
https://docs.nasaqui.com/?path=/docs/components-bookings-lobby-display--docs
CheckInKiosk
Self check-in kiosk - scan or type a booking code, or enter a phone number on a big keypad, find the booking, and print a queue ticket with a QR and an auto reset.
WaitingScreen
Patient waiting screen with ticket, position, estimated wait, now serving, room, a live connection indicator and a called state, driven by pure queue math.