Pairwise votePro
A versus B with tie and both bad, keys 1 to 4, blind by default.
On this page
ProBlind A versus B; vote with 1 to 4, names appear after.
Installation
Usage
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
| Prop | Type | Notes |
|---|---|---|
a, b | ReactNode | The two answers |
names | [string, string] | Revealed after voting |
value, onValueChange | PairwiseChoice | a, b, tie, both-bad |
revealNames | boolean | Show names before voting |
Accessibility
- The vote is a radio group; keys are shown on each option.