Skip to main content

TV & cinema

PrismDS targets the living room as a first-class context, not an afterthought. This guide covers the cinema scale, the TV safe-area / focus tokens, the spatial focus engine, and the behavioural rules every TV surface must follow. The reference implementation is MediaOS (ui_kits/mediaos/) — an in-room entertainment home screen built to tvOS-grade polish.

Two products live here: MediaOS (entertainment) and HospitalityOS's in-room TV. Both share this tier.


1. Cinema scale​

Set the tier explicitly with data-scale="cinema" (alias data-scale="tv") on <html> or any part of the page. It never turns on by viewport width, so a wide desktop monitor stays on the desktop scale. Everything scales up proportionately — type, spacing, control height and icons — for distance viewing and remote navigation (see tokens/scales.css).

  • The type roles re-anchor: --fs-body is 24px, and headings run from --fs-h6 (30px) to --fs-h1 (92px), --fs-display (116px) and --fs-hero (144px).
  • Controls use --control-xl (56px); icons scale about 1.4× (--icon-md 28px, --icon-xl 44px).
  • The page gutter (--layout-gutter) and --gap-section widen to 64px; --gap-group is 40px and --gap-stack 24px.

Author in container units for true any-size scaling. MediaOS sizes every value in cqw (1% of the stage width) inside a container-type: size stage with aspect-ratio: 16/9. The whole UI then scales to any screen — a 1280-px preview or a 4K panel — with no JS layout math and no cropping. Prefer this over fixed px for full-screen TV surfaces.


2. TV safe-area & focus tokens​

Defined in the cinema block of tokens/scales.css:

TokenPurposeDefault
--tv-safe-xtitle-safe horizontal inset (TVs overscan-crop edges)5.5%
--tv-safe-ytitle-safe vertical inset6.5%
--tv-safe-toptighter top inset for the pinned top bar3.5%
--tv-focus-ringfocus-ring thickness3px
--tv-focus-colorfocus-ring colouroklch(1 0 0 / 0.95)
--tv-focus-liftscale applied to a focused card1.08
--tv-focus-shadowdrop shadow under a focused cardsoft 4cqw black

Always pad content to the title-safe area. Never place text, controls or anything tappable in the outer ~5–6% — it may be cropped by the panel.


3. The focus engine​

TVs have no pointer. Navigation is spatial: arrow keys / D-pad move focus to the nearest element in the pressed direction; OK/Enter activates; Back exits. The engine is built into TVScene, and also ships standalone as components/tv/tvFocus.js for plain-HTML pages:

  • Geometry-based movement — on each arrow press, score every focusable by primary-axis distance + cross-axis distance × 2.2 and move to the lowest score. This gives natural, alignment-aware jumps and focus memory for free (returning to a row lands near the column you left).
  • Rail auto-scroll — focusing a card horizontally translates its rail so the focused card slides toward the start, exactly like tvOS.
  • Vertical page-pan — focusing a lower row pans the whole content body so the focused row sits ~40% down the viewport (the page scrolls under a pinned top bar).
  • Cinematic backdrop crossfade — the focused item's artwork fades in behind everything (two stacked, blurred layers), giving the screen depth.
  • Focus signature — the focused card lifts (--tv-focus-lift), gains a high-contrast ring (--tv-focus-ring/--tv-focus-color), a drop shadow, and a subtle specular sheen. Posters reveal their title caption only when focused.

Focus rules​

  1. Visible focus is mandatory — the ring must read from across a room; never rely on colour or scale alone.
  2. One focus owner — exactly one element is focused at all times; default focus to the primary action (e.g. Play) on entry.
  3. No hover assumptions — every hover affordance must have a focus equivalent. (Mouse hover may additionally move focus, as MediaOS does, for desktop preview.)
  4. Large targets — focusable cards are big; spacing between them is generous (≥ the focus ring + lift won't collide).
  5. Honour reduced-motion — gate the lift/pan/crossfade transitions behind @media (prefers-reduced-motion: no-preference); keep the ring.

4. TV primitive vocabulary​

Each primitive ships as a component in components/tv/. Wrap every TV surface in one TVScene and compose the rest inside it:

PrimitiveComponentWhat it is
TV app shellTVScenecontainer-type: size 16:9 stage + pinned glass top bar + scrolling content body
TV safe areaTVScenepadding via --tv-safe-x/y; rails bleed to the right edge, inset on the left
TV focus ringany data-tv-focus elementthe ::after of .prism-tv-foc, drawn with --tv-focus-ring / --tv-focus-color when the engine adds .is-tv-focused
TV focusable cardTVCardposter/thumbnail with lift + ring + caption-on-focus
TV railTVRailhorizontally-scrolling track of cards with a title + "See All"
TV heroTVHerofull-bleed featured item: kicker, oversized title, metadata row, glass actions
TV menu / navTVTopBar + TVTabsfrosted Liquid Glass pill of tabs with a light selected pill
TV media controlsTVMediaControlsglass transport bar (play/pause, scrubber, skip) — same focus signature
TV QR handoffTVQRHandoffshow a QR for any complex text entry (login, search, payment) — never force on-screen keyboards
TV language selectorTVLanguageSelectorlarge-target list, flag + endonym, on first run
TV idle / screensaverTVIdleScreenafter inactivity, dim to ambient art + clock
TV remote-help overlayTVRemoteHelpa persistent hint chip (↑↓←→ Navigate · ⏎ Select)
TV button, dialog, toastTVButton, TVModal, TVToastthe glass action, the focus-trapping dialog and the transient message
TV emergency screenTVEmergencyScreena full-screen takeover for property alerts
TV network-failure stateEmptyStateuse EmptyState variant="offline" scaled to cinema
TV guest-privacy resetapp behaviouron hotel checkout, wipe watch history / accounts (see COMPLIANCE)

Liquid Glass material: background: oklch(1 0 0 / 0.08–0.14) + backdrop-filter: blur() saturate(1.6) + a 1px --tv-glass-border (oklch(1 0 0 / 0.18)) border + an inset top highlight. Use for the nav, glass buttons, badges and hint chip.


5. Remote interaction matrix​

InputAction
▲ ▼ ◀ ▶Move focus spatially
OK / EnterActivate focused element
Back / EscUp one level; from home, do nothing (never exit to black)
Home / MenuReturn to the home screen, restoring last focus
Play/PauseToggle transport when media is active
Long-press OKContext actions (where relevant), e.g. remove from Continue Watching
InactivityIdle screen after timeout; guest reset on hospitality checkout

6. TV accessibility & QA checklist​

  • Focus ring visible at 3 m on every focusable, in light and dark content.
  • All content inside the title-safe area.
  • Reaches every actionable element with the D-pad alone; no pointer required.
  • Focus order is logical; focus memory works returning to a row.
  • OK activates; Back never dead-ends to a black screen.
  • Reduced-motion disables lift/pan/crossfade but keeps the ring.
  • Text ≥ the cinema type floor; contrast ≥ 4.5:1 over busy artwork (use scrims).
  • Complex input offers a QR handoff.
  • Network-failure and idle states defined.
  • (Hospitality) guest data resets on checkout.