Skip to content
Sign in
EvalsPairwise voteMenu

Pairwise votePro

A versus B with tie and both bad, keys 1 to 4, blind by default.

ProBlind A versus B; vote with 1 to 4, names appear after.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/pairwise-vote

Usage

tsx
import { PairwiseVote } from "@/components/ui/chatcn/pro/pairwise-vote"

<PairwiseVote a={answerA} b={answerB} names={["Claude Sonnet 5.5", "GPT-6.1 Sol"]} value={vote} onValueChange={setVote} />

Model names stay hidden until the vote is cast, so a name cannot sway it. Keys 1 to 4 work while focus is inside, or on the whole page with globalKeys.

Examples

States

ProTie with names and both bad.

Props

PropTypeNotes
a, bReactNodeThe two answers
names[string, string]Revealed after voting
value, onValueChangePairwiseChoicea, b, tie, both-bad
revealNamesbooleanShow names before voting

Accessibility

  • The vote is a radio group; keys are shown on each option.