# Price scoreboard

The four numbers at the top of a pricing page: the range's position against the market with its index and trend, then how many lines are priced above, in line and below. The counts can filter the list underneath.

Docs: https://ui.twelfth.ai/price-scoreboard · Category: Pricing · Updated: 2026-10-30

## Install

```bash
npx shadcn@latest add https://ui.twelfth.ai/r/price-scoreboard.json
```

```tsx
import { PriceScoreboard, type PriceVerdict } from "@/components/ui/price-scoreboard"
```

## Example

```tsx
const [selected, setSelected] = useState<PriceVerdict | null>(null)

<PriceScoreboard
  positionPct={-8.6}
  trend={weeklyPosition}
  counts={{ above: 146, in_line: 251, below: 635 }}
  unitShares={{ above: 18, in_line: 27, below: 55 }}
  selected={selected}
  onSelect={(v) => setSelected((s) => (s === v ? null : v))}
/>
```

## As filters

Click a count to filter; click it again to clear. The selected tile is spotlit, not hovered.

```tsx
<PriceScoreboard
  positionPct={-8.6}
  trend={weeklyPosition}
  counts={{ above: 146, in_line: 251, below: 635 }}
  unitShares={{ above: 18, in_line: 27, below: 55 }}
  selected={selected}
  onSelect={setSelected}
/>
```

## Read-only

```tsx
<PriceScoreboard positionPct={0.3} trend={weeklyPosition} counts={{ above: 12, in_line: 88, below: 9 }} />
```

## No position yet

```tsx
<PriceScoreboard positionPct={null} counts={{ above: 0, in_line: 4, below: 1 }} />
```

## PriceScoreboard props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `positionPct` (required) | `number \| null` |  | The range's overall position vs market, in percent. |
| `counts` (required) | `{ above, in_line, below }` |  | Lines in each verdict. |
| `trend` | `PriceTrendPoint[]` | `[]` | Weekly position for the sparkline beside the index. |
| `unitShares` | `{ above?, in_line?, below? }` |  | Each verdict's share of recent units, in percent. |
| `selected` | `PriceVerdict \| null` | `null` | The verdict filtering the list. |
| `onSelect` | `(verdict) => void` |  | Makes the counts filters. |
| `info` | `ReactNode` |  | Beside the position, e.g. an (i) explaining the bands. |

## Notes

- Lays out on its own container width (@container), so it fits a narrow panel as well as a page.

---

twelfth UI: Open-source (MIT) shadcn components for category managers and retail buying teams, by twelfth (https://twelfth.ai). React and TypeScript on shadcn's Base UI styles and Tailwind CSS v4. Components take plain props and fetch no data. Every block: https://ui.twelfth.ai/llms.txt
