SPB Git

spb/airiskindex Public

The most methodologically rigorous, fully transparent AI job-exposure index.

TypeScript 88% Python 6.1% SQL 2.7% CSS 1.2% JavaScript 0.9% Shell 0.8%
1.1 KB · 33 lines tsx
Raw Blame History
1//  File:    score-band.tsx2//  Path:    packages/ui/src/score-band.tsx3//  Project: AI Risk Index — airiskindex.io4//  Author:  Simon-Pierre Boucher5//  Contact: contact@spboucher.ai6//  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.7//8//  Description: Shared score-band pill component (score with confidence interval).910export interface ScoreBandProps {11  label: string;12  low: number;13  score: number;14  high: number;15}1617/**18 * Displays a 0–100 score with its confidence interval. The UI must always be19 * able to display uncertainty (CLAUDE.md §1) — never render `score` without20 * offering the band.21 */22export function ScoreBandPill({ label, low, score, high }: ScoreBandProps): JSX.Element {23  return (24    <span className="inline-flex items-baseline gap-2 rounded-full border border-slate-300 px-3 py-1 text-sm">25      <span className="font-medium text-slate-700">{label}</span>26      <span className="text-lg font-semibold tabular-nums">{score.toFixed(0)}</span>27      <span className="text-xs text-slate-500 tabular-nums">28        {low.toFixed(0)}–{high.toFixed(0)}29      </span>30    </span>31  );32}33