Model Comparison Panel
A side-by-side comparison of two scored entries with win-highlighted rows derived purely from props, plus onClear.
Model Comparison Panel
The Model Comparison Panel is a side-by-side comparison of two scored entries with labeled rows (Score, Size, Speed, Quality, Device, Dimensions) where winning rows are accent-highlighted and losing rows dimmed, plus an onClear dismissal. Win-highlighting is derived purely from props (no orchestration state). Bind to useModelRecommendations.
Preview
Installation
pnpm dlx shadcn@latest add @localmode/ui/local-first/model-comparison-panelnpx shadcn@latest add @localmode/ui/local-first/model-comparison-panelyarn dlx shadcn@latest add @localmode/ui/local-first/model-comparison-panelbunx --bun shadcn@latest add @localmode/ui/local-first/model-comparison-panelData source & dependencies
Data source: renders the two scored entries you pass and emits onClear — works with any backend. Recommended producer: useModelRecommendations from @localmode/react (on-device, optional).
lucide-react— iconsclsx+tailwind-merge— via the sharedcn()util (installed automatically as a registry dependency)
Files installed
model-comparison-panel.tsx— theModelComparisonPanelcomponentlib/utils.ts— thecn()helper (if not already present)
Props
ModelComparisonPanel
Prop
Type
ComparisonEntry
Prop
Type
Examples
Compare two models
<ModelComparisonPanel entries={[a, b]} onClear={() => setCompare(null)} />Customization
"Better" is higher for Score/Speed/Quality/Dimensions and lower for Size. The win highlight uses the emerald palette; the loser is dimmed. Styled entirely with shadcn/ui CSS-variable utilities so it inherits your theme — because you own the copied file, every class and threshold is yours to change.
Model Search Browser
A cmdk-based searchable model-repo browser: search, sort, result rows, load-more pagination, and per-repo expandable file lists.
Adaptive Batch Card
Surfaces useAdaptiveBatchSize: a computed optimal batch number, hardware summary, detection source, and collapsible reasoning — with a compact badge variant.