Skip to the experiments

Interaction Lab

Can interfaces become expressive without sacrificing usability?

Nine small experiments, each built so the expressive layer can be taken away and the interface still works. They are live below. Use them with a mouse, then use them again with only the keyboard.

Every number on this page is produced in your browser while you use it. Until something has run, it says “not measured yet”.

Reduced motion forced by this page: off.

01Waiting

Can a button be honest about waiting without turning into noise?

The experiment: Async buttonopen it on its own page

The next request

Press it with the keyboard: Tab to focus, Enter or Space to press. Press it twice while it works: the second press is ignored. Past 1.2 s it says so instead of spinning forever.

State

  1. idle
  2. pending
  3. slow
  4. success
  5. error

Legal from here: START

Transitions

fromeventto
idleSTARTpending
pendingSLOWslow
pendingRESOLVEsuccess
pendingREJECTerror
slowRESOLVEsuccess
slowREJECTerror
successSTARTpending
successRESETidle
errorSTARTpending
errorRESETidle

What just happened

Nothing yet. Press the button.

Why this effect exists

A spinner says that something is happening and nothing else. This button commits to five states, and each has its own words, colour and announcement, so the delay is explained rather than decorated.

It stays focusable while it works and ignores presses it cannot honour, so an impatient second press cannot start a second request.

Keyboard and accessibility

  • Tabmoves focus to the button; it stays focusable while it works.
  • EnterSpacepresses it. Presses while it is pending or slow are ignored.
  • EnterSpaceafter a failure, the same keys retry.

Reduced motion: the moving progress bar becomes a still bar (partly filled), and the colour change is instant. The words carry the same information. A polite live region announces each state.

Evidence

States defined
5: idle, pending, slow, success, error
Legal transitions
10
State right now
idle (no press yet)
State changes seen this visit
0
Last change
not measured yet
Time until the SLOW state (last request)
not measured yet
Outcomes
0 succeeded, 0 failed
Reduced-motion mode
off

Read from the button's own state changes while you use it. The slow threshold in this demo is 1.2 s.

02Choosing

Can a menu spring out of its trigger and still behave like a menu?

The experiment: Radial menuopen it on its own page

Tab to the plus, press Enter or Space. Arrow keys walk the ring, Home and End jump, type a letter to jump to a label, Escape closes and puts focus back on the plus.

Last chosen

Nothing yet

Focus order

  1. 1. Reply
  2. 2. Pin
  3. 3. Share
  4. 4. Move
  5. 5. Archive
  6. 6. Mute

Menu is closed. Only the highlighted item is a tab stop (roving tabindex).

Focus trail: none yet

Why this effect exists

Items that travel out of the trigger help the eye connect a control to what it opened. That is all the spring is for.

Underneath it is an ordinary menu button: one tab stop, arrow keys, type-ahead, and Escape returns focus. If the motion were removed, nothing would stop working.

Keyboard and accessibility

  • EnterSpaceon the plus opens the ring and focuses the first item.
  • ↓→opens at the first item, or moves to the next; wraps.
  • ↑←opens at the last item, or moves to the previous; wraps.
  • HomeEndjump to the first or last item.
  • A–Ztype a label's first letters to jump to it.
  • EnterSpaceon an item chooses it and announces it.
  • Esccloses and returns focus to the plus. Tab does the same.

Reduced motion: the items appear instantly in place, with no spring, fade or rotation. Choosing is announced through a polite live region either way.

Evidence

Items on the ring
6: Reply, Pin, Share, Move, Archive, Mute
Menu right now
closed
Focused item
menu closed
Focus moves seen this visit
0
Last chosen
not measured yet
Live-region text after choosing
not measured yet
Focus back on the trigger after choosing
not measured yet
Reduced-motion mode
off

Read from focus events, and (after you choose) from the live region and document.activeElement in this browser.

03Moving

What does a more expressive curve actually do on your screen?

The experiment: Motion compareopen it on its own page

  • CSS transition

    transition: transform 700ms ease. The browser runs the curve.

    Frames
    not measured yet
    Avg frame
    not measured yet
    Worst frame
    not measured yet
    Overshoots
    not measured yet
    Settled at
    not measured yet
  • Linear rAF tween

    requestAnimationFrame, position = distance x elapsed / 700 ms.

    Frames
    not measured yet
    Avg frame
    not measured yet
    Worst frame
    not measured yet
    Overshoots
    not measured yet
    Settled at
    not measured yet
  • Spring physics

    Damped spring integrated each frame (the library's approach). No fixed duration.

    Frames
    not measured yet
    Avg frame
    not measured yet
    Worst frame
    not measured yet
    Overshoots
    not measured yet
    Settled at
    not measured yet

Every number is read in this browser during the run, from the dot's rendered position in each requestAnimationFrame. Frame gaps follow your display refresh and whatever else the page is doing, so they say little about the cost of each approach in isolation. Run it a few times; the values move.

Why this effect exists

Overshoot and settle make movement feel physical, but they also add travel and time. Instead of arguing about it, the same dot moves the same distance three ways.

Each run reads the dot's rendered position every animation frame, so the difference shows up as numbers from your own browser.

Keyboard and accessibility

  • Tabreaches “Run all three” and each row's own Run button.
  • EnterSpacestarts a run. A press while one is running is ignored.

Reduced motion: all three dots snap to the end with no animation, and the table says “snapped” rather than showing numbers. Each finished run is announced through a polite live region.

Evidence

CSS transition
not measured yet
Linear rAF tween
not measured yet
Spring physics
not measured yet
Runs completed this visit
0
Reduced-motion mode
off

Last completed run for each approach. Frame gaps come from requestAnimationFrame timestamps, so they reflect your display and how busy this page is, not the isolated cost of each approach. Run it a few times; the numbers move.

04Loading

Should an interface behave differently at 80 milliseconds than at 4 seconds?

The experiment: Latency statesopen it on its own page

Nothing loaded yet.

The next request

State

  1. idle
  2. pending
  3. skeleton
  4. slow
  5. success
  6. error
  7. cancelled

Legal from here: START

Event log

Nothing yet. Press Load.

Timestamps are measured with performance.now() from the moment you press Load. Timer callbacks can run a little late if the page is busy.

Why this effect exists

A skeleton that flashes for 80 ms is noise, and a bare spinner at 4 s is a shrug. This region shows nothing new for the first 150 ms, then a skeleton, and past 2 s it says how long it has been and offers Cancel.

The expressive part is that the interface changes with the wait, rather than treating every wait the same.

It is a state, not a component. useLatency() holds the timing rules, and the async button above runs on a slice of the same machine: no skeleton, no cancel, the same thresholds and the same refusal of late results.

Keyboard and accessibility

  • Tabreaches Load / Reload, and Cancel, Retry or Try again when they appear.
  • EnterSpaceactivates the focused button. Load is ignored while a request is out.
  • ←→on the latency slider changes the next request; radios use the arrows too.

Reduced motion: the skeleton is still (no shimmer) and the loaded content appears without a fade. A polite live region says Loading, Still loading, Loaded or Cancelled; failures use role=alert.

Evidence

Phases defined
7, with 19 legal transitions
Requests started this visit
0
Phase right now
idle (no request yet)
Skeleton (last request)
not measured yet
“Taking longer” message and Cancel
not measured yet
Ended
not measured yet
Reduced-motion mode
off

Read from the state machine's own events for the most recent request, timed with performance.now(). Timers can fire late if the page is busy. Set the latency under 150 ms, then over 2 s, to see both paths.

05Composing

Can a generative interface be allowed to say yes only to the design system?

The experiment: Token composeopen it on its own page

Compositions to generate
seeds 1 to 24

Weekly summary

Nothing here is off the scale.

split

New arrival

Built only from what the system allows.

stack

Almost there

Same tokens, different arrangement.

split

Field notes

Small steps, one at a time.

stack

Showing the first 4 of 24. The validator ran over all 24.

24 generated · 312 values checked · 0 outside the system

Try to break it

Takes the first composition and swaps one value for something off the scale. Each press tries a different kind.

The closed vocabulary

Spacing (px)
4812162432
Radius (px)
06121624
Type (px)
121416202432
Palette (6 from pastelColour, plus ink)
140 165 254254 165 140140 254 254254 254 140209 199 186174 245 2205 5 5
Layouts
stacksplitgrid
Blocks
1234

Titles use 20, 24, 32; body text uses 12, 14, 16.

Why this effect exists

Generated layouts tend to drift: a 13 px gap here, a slightly different pink there. Here the composer draws only from a closed set of spacing steps, radii, type sizes and palette colours, and a plain function checks every value before anything is drawn.

The palette is read from the pastelColour primitive, not typed in. The check is set membership only: it says nothing about taste or hierarchy.

Keyboard and accessibility

  • Tabreaches the count options, “Generate another batch”, “Inject an off-token value” and Clear.
  • ←→move between the count options once one is focused.
  • EnterSpacegenerates, or injects. The result is announced through a polite live region.

Reduced motion: new cards appear in place instead of easing in over 220 ms. Nothing else on this experiment moves.

Evidence

Closed vocabulary
6 spacing, 5 radii, 6 type sizes, 7 colours, 3 layouts
Compositions generated
24 (seeds 1 to 24)
Values the validator checked
312
Values outside the system
0
Injected off-token value
not measured yet
Rule that rejected it
not measured yet
Reduced-motion mode
off

Every number comes from running validateComposition() over each generated value, in this browser, using the same code as the unit tests. “0 outside” describes the composer's output, not the quality of the designs. Unit tests: pnpm test:tokens.

06Focusing

Can focus management be something you can see?

The experiment: Focus trailopen it on its own page

Project name: Untitled project

Open the dialog, then press Tab repeatedly. The trail on the right adds a line for every element that receives focus.

Focus trail

Nothing yet. Tab to a control, or press “Rename project”.

Times are performance.now() since the first move in the trail. Only moves inside this demo are listed. Newest first.

Why this effect exists

Focus is the keyboard user's cursor, and it is usually invisible to everyone else. Logging each move by element name makes the trap wrapping around, and focus coming home, something you can check rather than trust.

The dialog is an ordinary one. The trail only watches; removing it changes nothing about how the dialog works.

Keyboard and accessibility

  • EnterSpaceon “Rename project” opens the dialog and moves focus to the name field.
  • Tabmoves forward; from the last control it wraps to the first.
  • ShiftTabmoves back; from the first control it wraps to the last.
  • Esccloses the dialog and returns focus to the button that opened it.

Reduced motion: the dialog and its backdrop appear instantly instead of fading and rising over about 200 ms. Focus behaviour is identical.

Evidence

Dialog role and aria-modal (read from the DOM)
not measured yet
Focus moves logged this visit
0
Last move
not measured yet
Moves while the dialog was open
not measured yet
Trap wraps
not measured yet
Focus back on the invoker after closing
not measured yet
Dialog animation-name (computed)
not measured yet
Reduced-motion mode
off

Read from focusin events, aria attributes and document.activeElement in this browser. Only focus inside the demo is logged. aria-modal is set but the rest of the page is not made inert, and no screen reader has been tried.

07Responding

Can a field of springs be tuned by a number you can read instead of a feeling?

The experiment: Spring fieldopen it on its own page

starting

Damping coefficient c = 10.4 for k = 220, m = 1. Every dot is its own spring.

Why this effect exists

Every dot is its own damped spring, aiming at a point the pointer pushes or pulls it to. Whether it wobbles, glides or creeps is decided by one number, the damping ratio, which a small pure function computes from stiffness and damping.

Below 1 a spring overshoots. At 1 it arrives as fast as it can without crossing. Above 1 it is slower for nothing. The demo measures that on the dot you displaced most and puts the textbook prediction beside it.

Keyboard and accessibility

  • Tabfocuses the field; a probe appears in the middle.
  • ←→↑↓move the probe by 24 px.
  • Esclets go of the field; the dots spring home. Leaving the field does the same.
  • Tabon to the sliders and buttons, which are native controls.

Reduced motion: there is no spring at all: each dot moves straight to its target and straight back, and no overshoot or settle time is measured.

Evidence

Damping ratio from stiffness and damping
not measured yet
Spring constants (mass 1)
not measured yet
Dots away from rest right now
not measured yet
Simulation loop
not measured yet
Last release: whole field settled in
not measured yet
Last release: most-displaced dot swung past rest by
not measured yet
Closed-form overshoot for a spring released from rest
not measured yet
Reduced-motion mode
off

The simulation uses fixed 1/240 s steps. The closed-form figure is for a single spring released from rest; when you let go while the pointer was moving, the dots carry velocity and the measured figure can differ from it. Unit tests (pnpm test:lab) compare simulation and formula to within 1.5 percentage points.

08Reading

What would a progress bar say if it measured how you read instead of where you are?

The experiment: Reading railopen it on its own page

pace not enough movement yettime left scroll to beginpassed 0 of 740 words

A page that notices how you read

A list that reorders itself the instant you drop an item feels broken, even when the new order is correct. Nothing connects where the row was to where it went, so you have to find it again.

Motion fixes that, but only if it carries information. A row that glides to its new place tells you which row moved and where it landed. A row that bounces for its own sake tells you nothing.

The same test applies to text. A page can animate a progress bar as you scroll, but a bar that only fills is a thermometer. It says how far you are, and nothing about how you are going.

Reading is slower than scrolling. A person can move a page far faster than they can take in its words, so scroll speed alone says very little about reading, and a single fast flick would swamp any average.

So this rail does not measure each scroll event. It groups the position of a reading line into buckets of a few seconds and asks how many words passed through the line in each bucket.

A bucket that passes words faster than a skimming limit is set aside as skimming. A long run with no movement is set aside as being away. Neither is allowed to drag the estimate around.

What is left is time spent with the reading line moving at a plausible pace, plus short pauses, which count as reading because people stop to think. Words divided by that time is the pace.

Scrolling backwards is counted separately, as re-reading. It adds to the time spent but not to the words passed, so going back over a hard paragraph lowers the pace instead of inflating it.

With a pace, the remaining words give a time left. That figure moves as you speed up or slow down, and it is only as good as the last stretch it was measured on, which is why it says so.

The rail itself is the second readout. Each paragraph is a segment as tall as its word count. Once you have a pace, each segment is coloured by how long you spent there compared with how long it takes at that pace.

Under a set fraction of that time counts as skimmed, about that long as read, and much more as lingered on. The fractions are settings in this demo, listed in the evidence column, not facts about how people read.

Colour alone is a poor way to say anything, so the legend under the rail repeats each colour in words, with a count of paragraphs of each kind. The rail is a summary of those counts, not a replacement for them.

Nothing here can see your eyes. A page left scrolled to the middle while you make tea looks the same as a page being read slowly, until the idle rule notices, and a fast reader who barely moves the page looks slow.

It also cannot tell whether anything was understood. Scrolling at an even pace past text you did not take in produces a healthy-looking number. The measure is of the page moving, and a proxy at best.

That limit is the reason the measurement stays on this page. It is not sent anywhere, it is not stored, and the reset button clears every sample. Reloading does the same.

If you turn on reduced motion, the rail still updates but nothing eases: the marker jumps, colours change at once, and the page never scrolls itself. The skip button moves the page instantly either way.

Try it three ways. Scroll steadily and watch the pace settle. Stop on a paragraph and watch it turn into a linger. Then use the skip button and watch those words be counted as skimmed instead of read.

The keyboard works the same as the wheel. Focus the article, then use the arrow keys, Page Down or Space. Whatever moves the reading line is measured, because the measure only ever sees the line.

Everything in the evidence column comes from the samples taken while you used the page, through the same functions the unit tests run. Until you have scrolled, it says so, and shows no number at all.

That is the end of the article. If the rail is full, the last stretch is the one the estimate leans on, because the time left is measured over the most recent half minute of your reading.

  • not reached0
  • visited, no pace yet0
  • skimmed0
  • read0
  • lingered0

Why this effect exists

A reading line sits 40% down the article. Its position is sampled four times a second and grouped into buckets of a few seconds, because scrolling is much faster than reading and a per-event speed would only measure flicks.

Skimming, jumping, scrolling back and being away are each counted on their own, so they cannot bend the pace. The rail then colours every paragraph by your time there against your own pace.

Keyboard and accessibility

  • Tabfocuses the article, which scrolls like any region.
  • ↑↓PgUpPgDnSpacescroll it. Anything that moves the reading line is measured.
  • EnterSpaceon Skip to 70% jumps the article; those words count as skimmed, not read.
  • EnterSpaceon Reset measurement clears every sample and returns to the top.

Reduced motion: the rail and the paragraph highlight change at once instead of easing, and the page never scrolls itself. Skip is instant in both modes.

Evidence

Words in the article, counted from its text
not measured yet
Pace over all active time
not measured yet
Pace over the last 30 s
not measured yet
Time left at that pace
not measured yet
Words passed: read, skimmed, re-read
not measured yet
Active time, idle time
not measured yet
Paragraphs: skimmed, read, lingered
not measured yet
Position samples taken (every 250 ms)
not measured yet
Model settings (choices in this demo, not findings)
buckets 3 s, away after 15 s still, skimming above 1200 wpm, skimmed under 0.4x and lingered over 1.6x your pace
Reduced-motion mode
off

This measures the page moving, not eyes, and not understanding: scrolling evenly past text you did not read gives a healthy number, and a fast reader who barely scrolls gives a slow one. Nothing is stored or sent; reloading clears it. Unit tests: pnpm test:lab.

09Reordering

Can a drag-and-drop list be as good with only a keyboard?

The experiment: FLIP reorderopen it on its own page

Drag a row, or Tab to one, press Space to pick it up, move it with the arrow keys, and press Space to drop it. Escape puts it back.

Announcements appear here.

Why this effect exists

When a list changes order, each row is measured before and after (FLIP), then animated from where it was to where it is, so the eye can follow every row. Dragging uses the same code, with the held row following the pointer.

The keyboard path is not an add-on. Both input methods change the same list through one pure reducer, which also writes every sentence the live region says.

Keyboard and accessibility

  • Tabmoves between rows; each row is one tab stop.
  • SpaceEnterpicks the row up, and drops it where it is.
  • ↑↓move the picked-up row one place; at an end it says so.
  • HomeEndsend it to the top or bottom.
  • Esccancels and returns it to where it was picked up, however far it travelled.

Reduced motion: rows jump to their new places without animating. Dragging, the keyboard path and the announcements work the same.

Evidence

Order changes seen this visit
not measured yet
Last change was made by
not measured yet
Rows FLIP shifted on the last change
not measured yet
Web Animations running right after
not measured yet
Live-region text after the last change (read from the DOM)
not measured yet
Focus still on the moved row after a keyboard move
not measured yet
Row picked up right now
not measured yet
Reduced-motion mode
off

Shifts are measured with getBoundingClientRect before and after each change, and the live-region text is read back from the DOM. The announcements are present and update, but have not been tried with a screen reader.

What this page does not claim

  • It does not show these are more usable than the plain alternatives. There was no user study.
  • Measured numbers come from your browser, display and current load. They vary between runs and machines.
  • The live regions are present and update, but the announcements have not been tried with a screen reader.
  • The reduced-motion switch changes what these nine experiments do. It does not change anything else on the site.