Score deltaPro
A score and its change against a baseline, readable in mono.
On this page
ProBetter, worse and unchanged, and a lower is better latency.
Installation
Usage
import { ScoreDelta } from "@/components/ui/chatcn/pro/score-delta"
<ScoreDelta value={0.86} baseline={0.81} />Shares show as percent with the change in points; numbers show up to two decimals, or a fixed count with digits. Set higherIsBetter false for latency, cost and error rates, and the colors and words flip.
Examples
States
ProNo baseline, change only, display size and mono.
Props
| Prop | Type | Notes |
|---|---|---|
value, baseline | number | Now and before |
kind | "share" | "number" | Default share |
higherIsBetter | boolean | Default true |
deltaOnly | boolean | Only the change |
digits | number | Fixed decimals for number scores, so a column lines up |
Accessibility
- The change carries a hidden "better", "worse" or "unchanged".