Live Room

A game night on one big screen and everyone's phones. The host opens a room and shows its JoinCode; players scan or type it and land in the lobby; the host starts, everyone sees the same countdown, plays the same rounds, and the night ends on a Podium. The…

gamesclient≥ 320pxuiv1.6.0

Preview

Live Room — live rendergames-liveroom--default ↗

Rendered from the story the storybook (a11y) CI gate runs axe against — the preview can't show something that hasn't been verified.

Install

Two equivalent paths — the URL works in any shadcn-CLI setup; the alias works once you've registered @interlace in your components.json.

Via shadcn URL
npx shadcn@latest add https://ds.interlace.tools/r/live-room.json
With the @interlace alias
npx shadcn@latest add @interlace/live-room

Behavior

What this component does — the keyboard path, the measured colour, the text equivalent and the states it can be in. Every figure below is read out of the test or the source that enforces it by scripts/build-behavior-map.mjs, so nothing here can outlive the gate that keeps it true.

Every semantic colour pair this component's own source uses, measured against the shipped hexes in all 4 theme × scheme combinations. The tightest is muted-foreground on background at 7.82:1 (harbor · light), against a floor of 4.5:1.

Measured WCAG contrast ratios per token pair and theme
PairinterlacelightinterlacedarkharborlightharbordarkFloor
muted-foreground on backgroundsecondary copy9.11:111.16:17.82:19.52:14.5:1SC 1.4.3
muted-foreground on cardsecondary copy in a card9.41:110.48:18.25:18.64:14.5:1SC 1.4.3
primary on backgroundtext-primary on the page8.52:111.63:18.39:110.03:14.5:1SC 1.4.3
primary-foreground on primarycopy on a primary face8.80:111.79:18.86:110.03:14.5:1SC 1.4.3
primary on cardtext-primary in a card8.80:110.92:18.86:19.10:14.5:1SC 1.4.3
card-foreground on cardcopy in a card19.65:115.71:118.72:114.69:14.5:1SC 1.4.3
foreground on backgroundbody copy19.02:116.73:117.74:116.19:14.5:1SC 1.4.3

Text pairs are held to 4.5:1 (WCAG 2.2 SC 1.4.3); borders, rings and chart axes to 3:1 (SC 1.4.11 non-text). Bold is the worst cell in the row — the one a brand fork has to keep an eye on.

A chart's alt text is not a sentence about the chart — the equivalent of the data is the data. This is what a screen reader gets, read out of the source the install writes into your tree.

Label, not a data equivalentShips sr-only copy

Ships sr-only copy for what the visual carries by position, colour or icon alone — a label, not a full data equivalent.

Where it renders, how narrow it survives, and whether its lines are inside the coverage gate — three answers a consumer needs before the paste, not after the bug.

Render boundary
'use client'

Hydrates. It brings JavaScript to any route that imports it — put the boundary here, not at the page.

Minimum viewport
MIN_VIEWPORT = 320

Declared, not assumed. Below 320 CSS px the preflight contract draws a dev-mode outline — how to switch it on.

Coverage gate
not in the gate

The 100% gate currently covers src/charts/**/*.{ts,tsx} and pure cores: day keys, puzzle order, streak arithmetic. and , and , // DataTable: sort order, blanks last, page window, selection. and , // Photo upload: what a file is, what it says about its owner, the plan, the reducer. and , // The account control: names and initials, the return-path check, the reducer, the hook, the menu. and , and , and , // The five pure variant/model modules. and , // Booking: the slot picker and src/patterns/time-slot-model.ts and src/patterns/share-image-model.ts and src/patterns/{interest-model,commitment-model,session-plan-model,recap-model}.ts and src/primitives/{file-model.ts,file-drop.tsx} and src/patterns/avatar-upload.tsx and s first steps. and , // The 37 components with real render coverage. See the ledger above. and , // Patterns with full render coverage — the same ledger rule: a // file is in at 100 or it is out, and joining is a one-line diff. and , // Effects with full render coverage, on the same rule. and , . This file is outside it — the glob widens in phase 7.2.

History

This component is at v1.6.0, first shipped in @interlace/ui 2.0.0. The version is stamped as a banner into the file the install writes, so the copy in your tree says which one you have — compare it with the number above before deciding whether to re-run the install.

Unreleased24 entries

  • Changedpatch

    A check-in whose room has filled up no longer refuses every pick, or the host's next round. It keeps a pick for everyone who ever chose a mood, in every round, and a phone that rejoins gets a new id, so over a long session the picks of players who left reached the room's size limit and each pick and round was refused as full. A move that would leave the check-in over the limit now drops the picks of players no longer in the room, which are counted nowhere. While there is space nothing is dropped, so a player who rejoins with the same id keeps their mood.

  • Changedpatch

    Rating, quadrant, pin drop, ranking, points split, dot vote, prediction and typed answer whose room has filled up no longer refuse every answer. They keep an answer for everyone who ever sent one, and a phone that rejoins gets a new id, so over a long session the answers of players who left reached the room's size limit and every send was refused as full for the players still there. A move that would leave the activity over the limit now drops the answers of players no longer in the room, which are shown nowhere. While there is space nothing is dropped, so a player who rejoins with the same id keeps their answer.

  • Changedpatch

    A rating, quadrant, pin, ranking, points split, dot vote, prediction or typed-answer room at the size limit no longer locks the host out of closing or revealing it. Closing (open: false) or revealing makes the slice a few characters longer, so on a room sitting at the limit the move was refused as full while answers from phones that left (shown nowhere) filled it. Such a move now lets go of the answers of players no longer in the room, and only when the result would pass the limit.

  • Changedpatch

    Corners share one size check for a pick, a lock and a call, and a call names only a corner the room holds. Behaviour is unchanged: a corner id longer than the 24 characters a started room allows was never one it held, so the extra length check was redundant.

  • Changedpatch

    Debate corners whose room has filled up no longer refuse every pick. They keep a pick for everyone who ever chose a corner, and a phone that rejoins gets a new id, so over a long session the picks of players who left reached the room's size limit and every pick was refused as full for the players still there. A move that would leave the corners over the limit now drops the picks of players no longer in the room, which are counted nowhere. While there is space nothing is dropped, so a player who rejoins with the same id keeps their corner.

  • Changedpatch

    An exit ticket whose room sits at the size limit no longer refuses every answer and the host's close. A ticket keeps each player's answers for as long as the room does, so after a long session the answers of phones that left (shown nowhere) filled it, and a new send, or closing it (close), was refused as full. Such a move now lets go of the answers of players no longer in the room, and only when the result would pass the limit.

  • Changedpatch

    Raised hands whose room has filled up no longer refuse every raise. They keep a hand for everyone who ever raised one, and a phone that rejoins gets a new id, so over a long session the hands of players who left reached the room's size limit and every raise was refused as full for the players still there. A raise that would leave the hands over the limit now drops the hands of players no longer in the room, which are shown nowhere. While there is space nothing is dropped, so a player who rejoins with the same id keeps their place in line.

  • Changedpatch

    A check-in or corners room the players who left have filled up can still be moved on by the host. Closing a check-in writes "open":false, one character longer than "open":true, and calling a corner writes its id where null stood, so a room whose size sat at the room's limit had every close or call refused as full. A move that would not fit now drops the picks of players no longer in the room, which are shown nowhere. While there is space nothing is dropped.

  • Changedpatch

    A note board the room has filled up can still be closed by the host. Closing writes "open":false, one character longer than "open":true, so a board whose size sat at the room's limit (filled by notes of phones that left, which rejoin with new ids) had every close refused as full. A close that would not fit now drops the notes of players no longer in the room, and their moves, which are shown nowhere. While there is space nothing is dropped.

  • Changedpatch

    Debate corners, check-in, exit ticket, rating, quadrant and the other one-answer activities refuse a move from a player whose id is over 64 characters or __proto__. The room accepts any id, but every reader drops those, so the answer was accepted, shown for a moment and then lost on the next read. The move is now refused up front, as the Q&A board, reactions, hands and spectrum already do.

  • Changedpatch

    A live-room reaction from a player whose id is an Object.prototype key (constructor, toString, __proto__) no longer throws. The rate limit looked the id up on a plain object and got an inherited function, so allowReaction raised a TypeError and the room could not count that player's reaction. The budget now reads own keys only, and a __proto__ player's rate limit survives a JSON save and restore.

  • Changedpatch

    A live room's reveal now scores a player whose id is __proto__. The round's points were read and written with plain property access, so that player's points were read as 0 and their entry in lastPoints was dropped. Points are now read from own keys and lastPoints is built with Object.fromEntries, so the id is kept as data.

  • Changedpatch

    A word cloud, spectrum or debate corners round the room has filled up can still be closed by the host. Closing (or locking) writes "open":false, one character longer than "open":true, so a room whose size sat at its limit (filled by the words, dots or picks of phones that left, which rejoin with new ids) had every close refused as full. A close that would not fit now drops what players no longer in the room hold, which is shown nowhere. While there is space nothing is dropped.

  • Changedpatch

    The room join-code expiry check no longer carries a redundant typeof test. Number.isFinite is already false for anything that is not a number, so a missing or non-numeric join time still counts as expired and behaviour is unchanged.

  • Changedpatch

    An expired room code no longer admits a join whose time stamp is not a real number. codeExpired only treated a missing stamp as expired, so a join with at: NaN, null (what JSON makes of NaN) or text compared false against the expiry and got in after the code had closed. Any stamp that is not a finite number now counts as expired while the room has an expiry; reconnects of known players are unchanged.

  • Changedpatch

    A player whose id is longer than 64 characters no longer has their moves swallowed. The room does not bound a player's id, but every reader of a live activity drops anything over 64 characters, so a dot, reaction, raised hand or question from such a player was acknowledged and then never appeared on any screen. The activities now refuse it as bad-action, so the phone learns the move did not land.

  • Changedpatch

    A player whose id is also an Object.prototype name (constructor, toString, valueOf) can now answer in a live room. The room checked "already answered" with in, which also matches inherited keys, so that player's first answer was refused as already-answered and the host's progress count showed them as answered before they had. Both checks now look at the room's own answers only.

  • Changedpatch

    Two redundant typeof tests are gone from the live room's input checks: a move's timestamp and the numbers read back from a saved activity are now tested with Number.isFinite alone, which is already false for anything that is not a number. A missing, string or NaN timestamp is still refused as bad-action; behaviour is unchanged.

  • Changedpatch

    A reveal now adds points to a player whose id is __proto__. The reveal still wrote scores with scores[id] = ... on a copied object, which hits the prototype setter for that id, so the player's total stayed where it was. Scores are now built with Object.fromEntries, the way lastPoints already was. Follow-up to the __proto__ fix in #412.

  • Changedpatch

    A spectrum whose room has filled up no longer refuses every dot. It keeps a dot for everyone who ever placed one, and a phone that rejoins gets a new id, so over a long session the dots of players who left reached the room's size limit and every place was refused as full for the players still there. A move that would leave the spectrum over the limit now drops the dots of players no longer in the room, which are shown nowhere. While there is space nothing is dropped, so a player who rejoins with the same id still finds their dot.

  • Changedpatch

    The spectrum no longer loses the dot of a player whose id is __proto__. The room accepts any id, the spectrum took that player's dot, and the next read (or the next player's dot) dropped it because the dots were assigned onto a plain object. They are now read as plain data, so every screen shows the dot.

  • Changedpatch

    The word cloud, open wall and note board refuse a word, post or note from a player whose id is empty or over 64 characters. The room accepts any id, but their readers drop those, so the contribution was accepted, shown for a moment and then lost on the next read. It is now refused up front, as the one-answer activities, Q&A board, reactions, hands and spectrum already do.

  • Changedpatch

    An open wall no longer fills up with posts from phones that left. A phone that rejoins gets a new player id, so the posts of the old id stay in the room's slice, read by no screen, and over a long session they pushed the wall to its 300-post (or room size) limit until every live player's post was refused as full. When the wall is full, a post now lets go of the posts of players no longer in the room, as it already did for dismissed ones, before it refuses. The newest id is kept so an id is never reused, and nothing is dropped while the wall has room.

  • Changedpatch

    A word cloud no longer fills up with words from phones that left. A phone that rejoins gets a new player id, so the words of the old id stay in the room's slice, shown nowhere, and they counted toward the 600-word cap (and the room's size limit) until every live player's word was refused as full. When the cloud is at either limit it now lets go of the words of players no longer in the room before it refuses, and keeps everything while it fits.

@interlace/ui 2.2.01 entry

  • Addedminor

    The Q&A board, reactions, raised hands and spectrum now run on a live room with the room's guarantees. useRoomBoard, useRoomReactions, useRoomHand and useRoomSpectrum give the props for QuestionBoard, QuestionAsk, QuestionQueue, ReactionBar, ReactionStream, RaiseHand, HandQueue and Spectrum (unchanged), and boardActivity, reactionsActivity, handsActivity and spectrumActivity are the rules the host runs. A move is applied once however often it arrives, a phone sends it again until the host's state shows it (a reaction is sent once: a late reaction is no reaction), several moves can be in flight at once, a refreshed host gets everything back, and a player who is removed disappears from what every screen reads. For that, RoomEvent gains submit (a player's move in an activity: key, action, and a unique id), RoomState gains acked (the last ids of each player's moves, kept through serializeRoom and restoreRoom), and RoomSettings gains activities, a map of rules by key. useRoom stamps a move with the host's clock and tells a phone why a move was refused. Existing rooms are unchanged.

@interlace/ui 2.0.08 entries

  • Addedminor

    The live room is now a flow with one namespace: LiveRoom.Lobby, LiveRoom.Countdown and LiveRoom.HostControls, so typing LiveRoom. lists the whole journey and every app writes it the same way. useRoom, useSecondsLeft, the label and prop types stay flat (now LiveRoomLobbyProps, LiveRoomLobbyLabels and so on). The header carries a flow map: each phase of the room, the part that shows it on the host screen and on a phone, and the event that moves it on. The live room has not been released yet, so the flat RoomLobby, RoomCountdown and RoomHostControls names go without a deprecation step. The rules for flows are in docs/philosophies/FLOW_PHILOSOPHY.md, and a new lock test holds them.

  • Addedminor

    A live room kit for game nights on one big screen and everyone's phones. QrCode draws a join link as one SVG path from a dependency-free encoder (games/qr-model: byte mode, versions 1 to 40, levels L to H), and keeps dark-on-light on a dark page so every camera reads it. JoinCode shows the address, a code no one misreads (makeJoinCode, normalizeJoinCode, formatJoinCode) spelled out for screen readers, the QR and a copy-link button. useRoom keeps the host and every player on the same room: the host applies events with the pure rules in games/room-model (no joining a locked room, one answer a round, only the host starts) and sends the state to all, over any RoomTransport; an in-memory hub and a BroadcastChannel transport ship, and a realtime service is a small adapter in the app. RoomLobby (players pop in and are announced, the host can remove one), RoomHostControls (start, reveal, next, podium, lock, end, moving on by itself), RoomCountdown (3, 2, 1, Go to a host timestamp) and Podium (top three rising 3rd, 2nd, 1st with a burst for the winner, everyone else below) complete it. Every word goes through labels; all motion is transform or opacity and off under reduced motion.

  • Addedminor

    Live rounds move. AnswerPad plays the reveal: the right tile lands, the tiles nobody needs step back, a wrong pick gives one small nudge, and a right pick's points rise from its tile (transform and opacity only; nothing moves under reduced motion). New Standings, the board between rounds: each player's points pop in, totals count up from where they were (CountUp), then the rows glide to their new places (FlipGroup) with places gained in words. An ordered list, ranks shared on ties.

  • Addedminor

    Live rounds reach every phone. games/room-model gains RoomState.prompt and RoomState.solution: the host's question event can carry what the round asks (prompt) and its reveal the answer (solution), so every screen, and a player who joins mid-round, shows the same round without a second channel. Both are null in the lobby, cleared by the next question and by restart. AnswerPad is the player's side of a live round: big lettered tiles, the first pick final, "Answer in" while the host waits, then the right tile marked and the outcome in words. It never needs the right answer before the reveal, its state follows from value, closed and correct (so a reconnect shows the same thing), display="keys" shows letters only for rooms that keep the words on the big screen, and choiceKey(i) gives the big screen the same letters. Keys A to Z and 1 to 9 pick a tile; motion is transform only.

  • Addedminor

    Animations started from script now follow the brand's --ease-* and --duration-* tokens, like the CSS does. A new motion-token lib item reads them from the element that moves.

  • Addedminor

    Live rooms close the door on time and on guessers. createRoom takes codeExpiresAt: after it, the room refuses new players with expired while anyone already in can still reconnect, and the host moves it with an extend-code event. useRoom now stamps each join with the host's clock, like answers, so a phone cannot beat the expiry by setting its clock back, and a join that arrives unstamped while the room has an expiry is refused. checkJoinAttempt / recordJoinAttempt (games/room-model) cap wrong codes per source (5) and per room (30) in a sliding window (10 minutes), so a six-character code cannot be guessed while a person who mistyped is never stopped. JoinCode takes expiresAt and says how many minutes the code still works; once it has expired the QR goes, the code is struck through and the change is announced.

  • Addedminor

    Ways to run a live workshop, on the room's own state and transport. useAgendaSync keeps the existing Agenda and AgendaNow right across a presenter's windows: one window controls, any number show it over a RoomTransport<AgendaMessage>, a repeated tap is applied once, one made against an older screen is dropped and that screen is brought up to date, the controlling window's clock times everything (Agenda and AgendaNow gain an optional now), and createAgendaStore restores the agenda after a refresh with the clock still counting. TeamBoard, TeamScoreboard and TeamBadge make teams, balance them fairly (sizes within one; with scores the strongest players are dealt across teams), move a player by hand with a native select, and rank teams by average so a bigger team has no edge. BreakoutHost and BreakoutCard split the room into groups with a timer, send one message to every group (spoken once, whatever order states arrive in) and recall everyone. PairHost and PairCard pair everyone (a group of three when odd), deal each pair a card, and swap partners with the fewest repeats. RoomClock counts a host timestamp in minutes and seconds and speaks only a minute left, ten seconds and time up. RoomState gains shared, named extras the host sets with a new share event, so teams, groups and pairs inherit the room's guarantees: the newest seq wins, a late joiner and a reconnecting phone get them with the state, and a restored host restores them. serializeRoom, restoreRoom and createRoomStore keep a room across the host's refresh (everyone comes back away and rejoins by themselves, seq moves ahead so phones take the saved room as the newest). RoomTransport and the in-memory and BroadcastChannel transports take a message type, so a presenter's windows reuse them. New tokens --team-1 to --team-5 (and bg-team-N, border-team-N) alias the chart palette and can be forked alone.

  • Addedminor

    Live rooms hold up on real phones. Every state the host sends carries its clock, and useRoom returns now, this device's clock corrected to the host's (clockOffset in room-model), so a phone whose clock is off still counts down to the host's deadline; TimerRing takes now too. A player's page now says it is away on pagehide, asks for the room again when it is seen, and rejoins by itself when shown away, unless the player left on purpose (presence: false turns it off). Networks drop messages: a player's join or answer is sent again every 3s until the host's state shows it (5 tries), and the host no longer broadcasts a reply to a repeated or late answer.

Import

41 named exports — pull the parts you need.

Public API
import { ACK_KEEP, ActivityReducer, ActivityRefusal, JOIN_CODE_ALPHABET, JoinGuardVerdict, LiveRoom, MAX_SHARED_SIZE, MIN_VIEWPORT, RESTORE_SEQ_JUMP, RoomEvent, RoomHostEvent, RoomMessage, RoomPhase, RoomPlayerEvent, RoomRejection, answerProgress, applyRoomEvent, buildBoard, checkJoinAttempt, cleanName, clockOffset, codeExpired, connectedPlayers, createBroadcastRoomTransport, createJoinGuard, createMemoryRoomHub, createRoom, createRoomStore, formatJoinCode, makeJoinCode, normalizeJoinCode, pruneJoinGuard, rankEntries, readShared, recordJoinAttempt, rejectRoomEvent, restoreRoom, roomStandings, serializeRoom, useRoom, useSecondsLeft } from '@/components/ui/games/live-room';

Anatomy

Extracted from the primitive's JSDoc header. The source is the only documentation that can't drift.

useRoom({ transport, selfId, host? })  → { room, isHost, send }
  LiveRoom.Lobby                 (section — data-slot="room-lobby", data-count)
    ├─ div                       (data-slot="room-lobby-join": your JoinCode, when given)
    ├─ h2                        (data-slot="room-lobby-count": "8 players")
    ├─ ul                        (data-slot="room-lobby-players")
    │   └─ li × n                (data-slot="room-lobby-player", data-self, data-away)
    │       └─ Button?           (data-slot="room-lobby-remove", host only)
    ├─ p                         (data-slot="room-lobby-empty", before anyone joins)
    ├─ div                       (data-slot="room-lobby-actions": host controls, or "Waiting for the host")
    └─ span aria-live            (data-slot="room-lobby-announce": "Dana joined")
  LiveRoom.Countdown             (div role="timer" — data-slot="room-countdown", data-state)
    ├─ span                      (data-slot="room-countdown-value": 3, 2, 1, then "Go")
    └─ span aria-live            (data-slot="room-countdown-announce")
  LiveRoom.HostControls          (div role="group" — data-slot="room-host-controls", data-phase)
    ├─ p aria-live               (data-slot="room-host-status": "5 of 8 answered")
    ├─ Button                    (data-slot="room-host-primary": Start / Reveal / Next / Podium / Play again)
    ├─ Button                    (data-slot="room-host-lock": lock or unlock)
    └─ Button                    (data-slot="room-host-end")

API reference

Parsed from the type declarations in the source — the same file the install writes into your tree, so this table can't drift from the component you get.

LiveRoomLobbyProps

Also accepts every <section> attribute.

PropTypeDescription
players*readonly RoomPlayer[]—
selfIdstringThe viewer's id, to mark their chip.
joinReact.ReactNodeYour JoinCode (or any way in), shown beside the players.
actionsReact.ReactNodeHost controls. Leave out on a player's screen to show `labels.waiting`.
onRemove(playerId: string) => voidShows a remove button on each chip (host only).
hideAwaybooleanHide players who dropped out. @default false
labelsLiveRoomLobbyLabels—

LiveRoomCountdownProps

Also accepts every <div> attribute.

PropTypeDescription
startsAt*number | nullWhen it reaches 0, in ms (host clock). null: idle.
now() => numberYour clock, corrected to the host's. @default Date.now
onDone() => voidCalled once at 0.
size'default' | 'stage'@default 'default'
labelsLiveRoomCountdownLabels—

LiveRoomHostControlsProps

Also accepts every <div> attribute.

PropTypeDescription
room*RoomState—
send*(event: RoomHostEvent) => void`send` from the host's `useRoom`.
minPlayersnumberPlayers needed to start. @default 1
countdownSecondsnumberSeconds of countdown before each round. @default 3
roundSecondsnumber | nullSeconds per round, or null for no clock. @default 20
score(room: RoomState) => Record<string, number>Points per player id for the round being revealed. @default () => ({})
autoAdvancebooleanMove on by itself: open the round when the countdown ends, reveal when the clock runs out or everyone has answered. @default true
now() => number@default Date.now
labelsLiveRoomHostControlsLabels—

Accessibility

Every story for this component is rendered headlessly and checked with axe-core (wcag2aa, wcag22aa, best-practice, ACT) on every PR. That gate has no continue-on-error, so what ships has zero known violations.

What follows is what static analysis can see. Axe cannot press a key and never sees an overlay open, so the operable-without-a-mouse claim lives in Behavior instead, where the keyboard path is replayed step by step.

Focus + keyboard behaviour
Native element semantics — no interaction layer to get wrong.
Focus ring (WCAG 2.2 SC 2.4.13)
Not focusable — no focus indicator required.
Reduced motion
Animation is gated on prefers-reduced-motion.
ARIA in the source
  • role="group"
  • role="timer"
  • aria-label
  • aria-labelledby
  • aria-live

Examples

4 more states from the same story file.

R-rule compliance

Every primitive in @interlace/ui models to the portable 26-rule floor enforced by the componentApi ESLint preset. The cells below pin exactly where each rule applies in this file.

RuleConceptWhere
R4Extends native el`section` / `div` props
R6data-slot per partroom-lobby-*, room-countdown-*, room-host-*
R7cn + ...rest`cn(…, className)` + `{...props}`
R8Enums, not booleans`size`
R14Declares min viewport`data-min-viewport` + exported const
R25Client componentthe room runs in the browser
R26A11ylist of players; sparse live announcements; timer role

Minimum viewport

This primitive declares MIN_VIEWPORT = 320 CSS px (DESIGN_PRINCIPLES #14). When mounted in a container narrower than this, the preflight contract draws a dev-mode outline so the regression is visible during local development.

Opt-in to the dev-mode warning
<body data-interlace-dev>...</body>

Add the data-interlace-dev attribute to the body in development builds only — preflight then outlines any primitive whose container is below its declared data-min-viewport.

Dependencies

Base UI primitive
Native / no Base UI dependency
Lucide icons
  • Lock
  • LockOpen
  • X
NPM dependencies
  • lucide-react

Source

The full implementation — components/ui/games/live-room.tsx once installed.

874 lines · TypeScript
'use client';

import * as React from 'react';

// @interlace/live-room v1.6.0 — Interlace design system.
// Docs, props and live preview: https://ds.interlace.tools/c/live-room
// What changed since: https://ds.interlace.tools/c/live-room#history
// Generated banner — keep it, the upgrade diff reads this version.

/**
 * @interlace/ui — LiveRoom: useRoom and the LiveRoom flow (Lobby, Countdown, HostControls)
 *
 * A game night on one big screen and everyone's phones. The host opens a
 * room and shows its JoinCode; players scan or type it and land in the
 * lobby; the host starts, everyone sees the same countdown, plays the same
 * rounds, and the night ends on a Podium. The rules of the room live in
 * `room-model.ts` (pure), and the network is whatever `RoomTransport` the
 * app passes, so no realtime vendor is built in.
 *
 * ## Flow

…854 more lines…

Registry JSON

The raw registry record — what the shadcn CLI fetches.