Title screen
A game’s first screen on a navy tablet bezel: a painted sunset cliff with a lone traveller, a serif wordmark, “Press any button”, and a right-aligned menu with a sliding pointer.
title-screen/title-screen.tsxVer. 1.4.2Data Ver. 3.0© 2026 Eventide
The live component, numbered part by part. Every measurement is read from it as it is drawn. Point at a row to outline its part, or at a part to find its row.
The choices it offers, each value drawn live and the default marked, with how to pick one.
When to use
- The first screen of a game or a game-like experience: the name, a call to start, then the few ways in (continue, new game, options, extras).
- A boot or attract screen that waits on its own and starts on any key, click, tap or gamepad button.
- A short main menu read with a controller: up and down move one pointer, A chooses, B goes back to the intro.
- A launch screen that should set the mood with a original Eventide key painting and a live wordmark before any choice is asked of the player.
When not to use
- The landing page of a site or an app. Use a hero with a heading and a call to action; nothing here is scrollable or indexable.
- A pause menu over a game in progress. Use a system menu or menu tabs, which sit over the play and list more pages.
- Choosing between many entries, saves or levels. Use a list with a selection frame (a save list or a quest log), which scrolls.
- A splash that only shows a logo while something loads. Use a loading screen with progress; this one waits for the player.
- Choosing one of a few answers in a conversation. Use a choice list beside the dialogue box.
In a game
- Pass
autoplay={false}. The demo that starts, browses and backs out on its own is for the gallery; settingdefaultPhaseturns it off too. - The screen only shows the choice. It flashes the item and calls
onChoose; opening the next screen, and any sound, is yours, as areonStartandonBack. - The keyboard works while focus is inside the screen, never page-wide. A connected gamepad is read while the screen is on view.
keys={false}turns both off.
Each one drawn with the component itself, used well or badly.
Few words, read at a glance before anything is asked of the player.
- The name as the game spells it. From seven letters on it shrinks to fit 340 units: a 14-letter name is about half the size of a six-letter one.
- Kicker and tagline of a few words each. They don’t wrap.
- The prompt a short call to act:
Press any button,Tap to start. - Menu items of one or two words, nouns or verbs, in the same casing all the way down:
Continue,New Game,Options. - Version lines, two or three short ones: the build, the data, the rights.
You can add this component with the shadcn CLI or by hand:
Into components/title-screen of any React project, with no setup:
npx shadcn@latest add https://brunodelorence.com/r/title-screen.json- Copy the component files
Copy these files into one folder of your project, keeping their relative imports together, or download them as a ZIP:
- Copy the media files
To the same paths under your project’s public folder:
- Import it
As shown under Usage, below.
Either way it needs React 19 and a bundler that supports CSS Modules, such as Next.js or Vite. It has a dark colour scheme: it follows your page’s color-scheme, light unless the page sets one, or its colorScheme prop, with nothing to configure. Browsers without light-dark() show it light.
Usage
import { TitleScreen } from './title-screen';export function Boot({ onContinue }: { onContinue: () => void }) { return ( <TitleScreen autoplay={false} logo={{ kicker: 'The Song of', name: 'Eventide', tagline: 'Beyond the Far Ridge' }} onChoose={(item) => { if (item.id === 'continue') onContinue(); }} /> );}Each state below is a live instance, locked so you can study it.
The pieces it is built from, each with its measurements read live.
The screen a game opens on. An original Eventide painting shows Iria, a cartographer in an ochre poncho, above a green river vale and ancient circular wind arches. Any key, click, tap or gamepad button starts the live menu; arrows move the selection, A or Enter chooses, and B or Escape returns to the intro. The wordmark, version lines and original navy bezel remain live.
- The device is one drawing in design units: --u is min(1px, 100cqi / (960 + 2 × 16)), from the stage’s width by a container query unit, and every size is a multiple of it, so the 960 × 540 screen and its 16-unit bezel scale as a whole. Under 600 px the screen becomes a 392 × 640 portrait one: the painting keeps its height and is cropped around the traveller, and the wordmark, menu and prompt take portrait positions.
- An original Eventide key painting shows Iria, an adult cartographer in an ochre poncho, overlooking chalk wind arches and a green river vale. The title, prompt, menu, transitions and version labels remain live.
- The complete image breathes with a slow scale over 48 seconds. The existing pause, drift and reduced-motion controls stop this movement; there are no independently fabricated cloud, bird or landscape layers.
- Starting flashes the prompt (420 ms), pulses the cyan rim, glides the wordmark from the centre to the top right by translate and scale (760 ms, ease-out), then slides the menu items in from the right 60 ms apart and fades the version lines in.
- The pointer is one glyph in the menu, moved by translate to the selected row on a 30-unit pitch with an overshooting curve (190 ms), and placed just before the item’s words from their measured width (the items are right-aligned and of different lengths). At either end it only nudges; choosing flashes the item and darts the pointer.
- Input: on the intro any key but Tab and the modifiers, a click or tap, or any gamepad button starts; on the menu the arrows or W and S move, A, Enter or Space choose, B, Escape or Backspace go back, a mouse hover moves the pointer and a click chooses. A connected gamepad’s d-pad, stick, A and B work too.
- Uncontrolled, a demo waits on the intro, starts, browses down and up, chooses Continue and backs out, while the screen is on view and untouched; any real input hands it to the reader. Off screen or in a hidden tab every animation pauses.
| Prop | Type | Default | Description |
|---|---|---|---|
items | TitleMenuItem[] | Continue, New Game, Options, Extras | The menu, top to bottom: { id, label }. |
logo | TitleLogo | { kicker: 'The Song of', name: 'Eventide', tagline: 'Beyond the Far Ridge' } | The wordmark: a small kicker line, the name (its size follows its length) and a tagline. |
version | string[] | ['Ver. 1.4.2', 'Data Ver. 3.0', '© 2026 Eventide'] | The lines in the bottom right corner, shown on the menu. |
prompt | string | 'Press any button' | The intro’s call to start. |
selected | number | — | The item under the pointer, controlled, as an index into items. Turns the demo off. |
defaultSelected | number | 0 | Uncontrolled, the item the pointer starts on. |
defaultPhase | 'intro' | 'menu' | 'intro' | Opens on the intro or straight on the menu. Set, it turns the demo off. |
onSelect | (index: number) => void | — | Called when the pointer moves to another item. |
onChoose | (item: TitleMenuItem, index: number) => void | — | Called when an item is chosen. |
onStart | () => void | — | Called when the player presses a button on the intro. |
onBack | () => void | — | Called when the player backs out of the menu to the intro. |
drift | boolean | true | The slow scale drift of the original game image. |
keys | boolean | true | Listen to the keyboard (while focus is inside) and to a connected gamepad. |
autoplay | boolean | true | While on screen and untouched, a short demo: start, browse, choose, back out. Any real input stops it. |
colorScheme | 'light' | 'dark' | 'system' | — | Sets color-scheme on the root: the bezel’s edge, its shadow and the focus ring follow it; the screen keeps its own colours. |
className | string | — | Added to the root. |
Keyboard
Tab reaches one stop: the start button on the intro, the selected item on the menu. On the intro any key but Tab and the modifiers starts; on the menu the arrows or W and S move, Enter, Space or A choose, Escape, Backspace or B go back. The pointer doesn’t wrap and there is no Home or End. The letter keys work only while focus is inside the screen, so they can’t fire by accident (WCAG 2.1.4).
Screen readers
- The screen is a group named after the game, described as a “title screen”; the intro is a real button labelled by the prompt.
- The menu is a
role="menu"ofmenuitembuttons, hidden while the intro shows. While focus is inside, it follows the selected item as the pointer moves. - A polite live region says “Main menu. Continue.” on start, each item as it is reached, “Continue chosen.” on a choice, and the prompt again on going back.
Target size
Each menu item takes taps across its whole row, 30 units tall (33 on the narrow screen), so it passes 2.5.8 at full size. Scaled down, the landscape rows fall under 24 px once the screen is narrower than about 830 px with its sides; under 600 px the screen goes portrait and its rows hold 24 px down to about a 330 px stage. Keep the landscape screen wide.
Contrast
The menu items, the prompt and the version lines sit on a soft dark wash or the painting’s dark foot, at least 4.5:1 where the painting is lightest (WCAG 1.4.3, Contrast); the prompt’s pulse stays between 75% and full so it holds too. The wordmark is the game’s logo, which 1.4.3 leaves out.
Motion and timing
With reduced motion there is no drift, no demo and no slides: the states swap at once. Off screen or in a hidden tab everything pauses. The reader’s first key, click or tap stops the demo for good, holds the painting still where it is and stops the prompt’s pulse (WCAG 2.2.2, Pause, Stop, Hide); drift={false} keeps the painting still from the start, and autoplay={false} keeps the demo off.
In this build
- The screen is a labelled group named after the game; the intro is a real button (“Press any button”), and the menu is a role="menu" of menuitem buttons with a roving tabindex, so Tab reaches the selected item and the arrows move along.
- Focus follows the screen while it is inside: to the selected item when the menu opens and as the pointer moves, back to the start button on the intro. A focus ring rings the device, and a focused item gets its own outline.
- A polite live region says “Main menu. Continue.” on start, each item as the pointer reaches it, “… chosen.” on a choice, and the prompt again on going back.
- The painting, the pointer glyph, the ornaments and the flashes are aria-hidden; the wordmark is text.
- Under reduced motion there is no drift, no demo and no slides: the states swap at once. Every animation pauses off screen or in a hidden tab, and drift={false} stills the painting.
The complete source behind this demo. Open source under the MIT license, © 2026 Bruno Delorence: copy it, change it, ship it.
// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useEffect, useEffectEvent, useId, useRef, useState, type CSSProperties, type KeyboardEvent as ReactKeyboardEvent,} from 'react';import { TitleArt } from './art';import { useAutoplay } from './use-autoplay';import styles from './title-screen.module.css';/* * Title screen: the first screen of a game, on a tablet-like device of its own (a navy bezel with * a cyan rim and small ornaments). A painted sunset landscape (art.tsx) fills the screen: a lone * traveller seen from behind on a rock at a cliff edge, the valley and its ranges beyond. Its * layers pan together by depth, slowly, and the clouds and birds drift on their own loops, until * the reader's first key or press, which holds the painting still where it is. */* Title screen (title-screen.tsx): a whole game screen on a device of its own. The bezel is navy with a cyan rim and small cyan ornaments; inside it, the original Eventide key painting (art.tsx), the wordmark, the intro prompt, the menu with its pointer glyph, and the version lines. Every size is a multiple of --u, one design unit (1 px at full size) of a 960 × 540 screen (--sw × --sh) inside a --bz bezel, or 392 × 640 on a narrow stage. --u comes from the stage's width by a container query unit, so the device scales as one drawing; --title-unit fixes it. On the narrow screen the painting keeps its height and is cropped around the traveller. Colours: the screen keeps its colours on any page, as a game screen does; only the bezel's edge, its shadow and the focus ring follow the scheme, through light-dark(). Motion: the painting's layers pan by translate with their depth (--k), the clouds, mist, birds, halo and rays have their own slow loops, held where they are from the reader's first input (data-held); the wordmark glides by translate and scale between the intro and the menu; the menu items slide in by keyframes, staggered; the pointer slides by translate with an overshoot. Off screen everything pauses; reduced motion stops it all. */.root { /* The screen. */ --ink: #f6f3e9; --ink-dim: rgb(226 230 228 / 0.9); --mark: #f3eedf; --logo: #efe8d6;// Copyright (c) 2026 Bruno Delorence. MIT License.// Original Eventide key painting. The screen owns motion and text overlays.export function TitleArt({ id, className }: { id: string; className?: string }) { return ( <svg className={className} data-art={id} viewBox="0 0 960 540" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false" > <image href="/experiments/eventide/scenes/eventide-title.webp" width="960" height="540" preserveAspectRatio="xMidYMid slice" /> </svg> );}// Copyright (c) 2026 Bruno Delorence. MIT License.'use client';import { useCallback, useEffect, useRef, useState } from 'react';/* * When a demo may play on its own: while part of it is on screen and the tab is visible, never * under reduced motion, and never again once the reader has used it: `take()` hands it to the * reader for good (until the component remounts). `taken` says the reader has done so, for other * motion that should stop with it. `visible` alone says whether it is on screen in a visible tab, * for clocks that should stop when nobody can see them. */// `_idle` is kept for callers that still pass it; the demo no longer comes back on its own.export function useAutoplay<T extends HTMLElement>(_idle = 6000) { const ref = useRef<T>(null); const [visible, setVisible] = useState(false); const [reduced, setReduced] = useState(true); const [taken, setTaken] = useState(false); useEffect(() => { const element = ref.current; if (!element) return; let onScreen = false;