Ballmac UI home

Model Compare

New

Models side by side, with intelligence, speed and cost as meters that also have a spoken value, context size, a Recommended mark, search, provider filters, and a plain reason when a model is not available.

v1.0.0Updated Oct 25, 2026Ships with a test
What changed
Which model should run this agent?

Sonnet 5.5 by Anthropic is selected.

Installation

$ pnpm dlx shadcn@latest add @ballmac/model-compare

Usage

import { ModelCompare, formatTokens } from "@/components/ballmac/model-compare"

The full example is in the Code tab above.

Examples

A short list

Quality

Balanced by Auto is selected.

API reference

PropTypeDefault
models*ModelOption[]—
value

The chosen model id. Controlled.

string—
defaultValue

The chosen model id for uncontrolled use.

string—
onValueChange(id: string) => void—
label

Heading above the list.

string—
searchable

Show the search box. On by default when there are more than six models.

boolean—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Arrow keysA native radio group: Up, Down, Left and Right move between available models, Space selects; unavailable models are skipped
MetersEach meter is an image with a spoken value, such as 'Intelligence 4 of 5' and 'Cost 2 of 5, lower is cheaper'
SelectedAnnounced in a polite live region as '<name> by <provider> is selected'
FiltersProvider chips are toggle buttons with pressed state; search is a labelled search box
UnavailableThe reason is written on the card, not only shown by dimming

Use with AI

models is [{ id, name, provider, description?, intelligence: 1-5, speed: 1-5, cost: 1-5 (1 is cheapest), context?: tokens, recommended?, unavailable?: reason }] (required). value / defaultValue / onValueChange, label, searchable (default: on when there are more than six). Each model is a native radio; one with unavailable is disabled and shows the reason. Search and provider chips filter the list. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Model Compare (@ballmac/model-compare) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Letting a person choose which model runs their agent or chat
  • Comparing models by capability, speed and cost on one screen

Not for

  • A compact searchable selector inside a composer; use model-picker
  • A tiny two-way switch between fast and smart; use segmented-control
  • Comparing the outputs of several models; use prompt-playground or parallel-attempts

Registry JSON: https://ui.ballmac.com/r/model-compare.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.