Style book
Motion
Curves, durations and the order things move in, each demo running on the values the app uses.
Motion & focus
Bytestream picks a motion by what is moving. A control changing state takes 200 ms, anything changing size or position takes 250 ms, and a sheet sliding in from an edge takes 350 ms on a hard deceleration. Nearly everything runs on one curve. The numbers live in src/ui/motion.ts as tokens.motion, and the rules are in design/motion.md. Loops keep their own clocks: the tuning pulse (1.2 s) is the one in the player. No scroll reveals.
| Hover, press, focus, colour | state 200 on standard |
|---|---|
| A glyph turning | state 200 on standard, as a rotation (the rail tab's triangle) |
| Size or position, a collapse | move 250 on standard; a fade that leaves space goes first |
| Sheet or drawer from an edge | sheet 350 on enter; the exit runs the same way back |
| Popover or menu | Fade from 0 and scale from 0.5, state 200 on pop |
| Popup or dialog | Fade from 0 and scale from 0.9, state 200 on standard |
| Slow secondary fade | slow 500 on standard |
| Reduced motion | Every duration is 0. The state still changes; nothing travels. |
Text fields warm their border to focus instead of taking a ring.
Curves
Point at a row, or tap it, to run its dot along the track at the duration it is used with; move away and it runs back. standard covers state changes, size changes and fades. enter starts fast and decelerates hard, for surfaces arriving from an edge. pop passes full size by a little and settles, for popovers growing out of their control.
.32, .08, .24, 10, 0, 0, 1.25, .1, .25, 1.3Plots: time left to right, progress bottom to top; the dashed line is the end value. CSS in motion.curve, native Easing in src/ui/easing.ts.
Durations
The four durations side by side, each over the same distance. state, move and slow run on standard; sheet runs on enter, as it does in the app.
Entrances & exits
Each surface arrives the way its kind always does, and leaves by the same motion run backwards. Press a stage to open it; press again to close it.
Popup: fade from 0, scale 0.9 to 1, state 200, standard.
Popover: fade from 0, scale 0.5 to 1 from its control, state 200, pop.
Sheet: from fully below the edge, translateY 100% to 0, sheet 350, enter.
Choreography
Order comes from delays. Closing, the content fades first and the space closes after it; opening, the space opens first and the content fades in. A fading item leaves the accessibility tree only when its fade has finished. This is the desktop rail fold, drawn at its real widths and timings: press the tab on its edge.
Folding: labels, wordmark and footer fade out (state); at 200 the rail narrows 248 to 64 (move) with the tab, the Go live pill and the glyph inset; the B mark and the stacked footer fade in from 250 to 450; at 450 the main area takes the width. Opening mirrors it, with the labels back 12 ms apart. Code: src/ui/rail.ts, src/ui/Chrome.tsx.
Entering theater
Theater clears the chrome away and leaves the picture in a dark room. Entering, the chrome (the sidebar, Watch's panel and the shelves) fades out on state while Watch's layout holds; then theater's layout is drawn and the picture grows from its place on Watch into the middle of the window on move, 450 ms in all. Leaving runs it backwards: the picture shrinks back on move, then the chrome fades in on state. The masks light at the press, and a second press part-way turns the room round from where it is. The player never remounts, because the move is a transform on the same picture. The chrome leaves the accessibility tree once its fade has finished.
Drawn at half a 1440 × 900 window: on Watch the picture is 769 wide; in theater it is 66% of the window. There it stands on a solid shadow, 0 24 64 at void 70%, under a hairline of light along its top edge. Theater turns on or off at once under reduced motion, while the window is resized and across the fullscreen handoff. · src/state/theaterRoom.ts (ROOM_STEPS, roomPhaseFor) · src/ui/roomMotion.ts (chromeFade, playPictureMove)
Lamp glow
The lamp turns ambience on and off. Ambience is a blurred copy of the playing picture, 22% larger than it, behind it at 55% (blur 70, saturation 1.8), so the room takes the picture's colour. The glow fades up and down over slow, 500 ms, on the house curve, and stays drawn through its fade out. Until 2026-10-02 it faded in and cut out. Press the lamp.
src/ui/Ambience.web.tsx (LAMP_FADE_MS, OPACITY). The crossfade between sampled frames keeps its own linear clock.