Eval Leaderboard
Models and prompts ranked on one evaluation, with the caveats on screen.
PROGet Eval Leaderboard and 168 other Pro components with pro lifetime — Get Pro
- Category
- RAG & Evals
- Access
- ProPro · unlocked
- Source
- 363 lines · one file
- States
- 6 drawn
- Added
- 12 Oct 2026
The decision inside it
It never claims a winner it cannot prove
With overlapping intervals the leaders are called too close to call, and with no intervals the table says small gaps may not be real.
When to use it
Use Eval Leaderboard to rank evaluation runs: each run's metrics in a sortable table, the best value per metric marked, and the direction (higher or lower is better) respected.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Eval Leaderboard for this.
Install it: npx shadcn@latest add @liro/eval-leaderboard
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/eval-leaderboard.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { EvalLeaderboard, type EvaluationRun } from "@/components/ui/eval-leaderboard";
const runs: EvaluationRun[] = [
{ id: "v3", name: "Prompt v3", model: "Model A", metrics: [{ key: "acc", label: "Accuracy", value: 0.91, format: "percent" }, { key: "lat", label: "Latency", value: 1.4, format: "duration", direction: "lower_is_better" }] },
{ id: "v2", name: "Prompt v2", model: "Model A", metrics: [{ key: "acc", label: "Accuracy", value: 0.86, format: "percent" }, { key: "lat", label: "Latency", value: 1.1, format: "duration", direction: "lower_is_better" }] },
];
export function Evals() {
return <EvalLeaderboard runs={runs} defaultRankBy="acc" />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
runs | EvaluationRun[] | Yes | – |
metricDefinitions | MetricDefinition[] | No | Columns, in order. Default: every metric found on the runs. |
rankBy | string | No | The metric the ranking follows. Controlled. |
defaultRankBy | string | No | – |
onMetricSort | (key: string) => void | No | – |
selectedRunId | string | null | No | – |
onRunSelect | (run: EvaluationRun | null) => void | No | – |
onOpenRun | (run: EvaluationRun) => void | No | Adds "Open run" to the details. |
currency | string | No | Currency for `currency` metrics. Default USD. |
look | Look | No | Layered sets it in a tray, the summary above the card. Flat leaves it on the page. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themebadgebuttonstateStates
All of them are drawn by the component. None is left for you to design.
- Ranked
- Re-ranked
- Tie
- Not measured
- Different datasets
- Run selected
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances