Skip to content
Sign in
EvalsScore deltaMenu

Score deltaPro

A score and its change against a baseline, readable in mono.

ProBetter, worse and unchanged, and a lower is better latency.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/score-delta

Usage

tsx
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

PropTypeNotes
value, baselinenumberNow and before
kind"share" | "number"Default share
higherIsBetterbooleanDefault true
deltaOnlybooleanOnly the change
digitsnumberFixed decimals for number scores, so a column lines up

Accessibility

  • The change carries a hidden "better", "worse" or "unchanged".