Skip to content

Photo Finish

Models race to answer the same prompt. Each lane fills as its answer streams, finishers take their place with a small pop and a rolling time, and when the first two land within 150ms a photo strip opens: a slit sweeps the line and the margin rolls in.

On this page
Used for
  • Race models on one prompt
  • Live latency comparison
  • Show who answered first
  • Call a close finish

Examples

Race

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

racersrequired
Racer[]
id, name, detail, progress (0 to 1 of the answer), finishedMs once done, and tokens for the line under the lane.
photoMs
number
Default150
The first two finishing this close open the photo strip.
raceKey
string | number
Change it for a new race: places, the strip and the announcement reset.
onRacerSelect
(id) => void
Each lane becomes a button that opens that answer.
title
string
Default"Race"
The prompt or the round's name.
placings / isPhotoFinish / winnerOf
helpers
Finishers by time, the rest by progress, a shared place on a dead heat.
Motion
-
Lanes fill on the slow token, ease in-out; a finisher's place pops once with usePlay confirm; times and the margin roll on the Odometer; the strip opens on Fold and the slit sweeps on SPRING.glide. Reduced motion: values at once, the slit already across.

Accessibility

  • The lanes are an ordered list; each one is named with its place and time, or how much is written so far.
  • The winner, and the margin on a photo finish, are announced once; progress ticks are not.
  • The magnified strip is decoration and hidden; the margin is in the text beside it.

What it handles

  1. 01Fills one lane per model from the progress you pass, and places finishers by time and the rest by progress.
  2. 02Shares a place on a dead heat and names how far behind the winner each finisher came in.
  3. 03Pops a finisher's place in once and rolls its time like an odometer, in hundredths of a second.
  4. 04Opens a photo strip when the first two finish within 150ms, with both bars magnified at the line.
  5. 05Sweeps a slit across the strip on a spring and rolls the winning margin up from zero beside it.
  6. 06Resets places, the strip and the announcement when raceKey changes, so a rerun starts clean.

States

First render
Nothing
none
Streaming
Lanes fill
280ms, ease in-out
A racer finishes
Its place pops and its time rolls
420ms, ease out, roll
Photo finish
The strip opens and the slit sweeps
none fixed: a spring (glide) that settles
Reduced motion
Values at once, the slit already across
0ms

Works with

When to use

When to use

  • Racing several models on one prompt and showing who answered first, and by how much.
  • A latency comparison people watch live, where a close finish deserves a second look.

When not to use

  • Judging the answers side by side and voting: use Model Arena.
  • Picking one model for the next message: use Model Picker.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Photo Finish to my app and wire it to my own data.
  • I need racing several models on one prompt and showing who answered first, and by how much. Set that up with the Knowns UI Photo Finish.
  • Which Photo Finish props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "photo-finish" }) and search_docs({ query: "photo finish" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Photo Finish, or found something off? We read every message.