Skip to content

Clarify Choice

The agent asks one short question when a request matches more than one thing, two customers called Northgate or three open contracts, and you pick the one you meant: cards with a detail line, number keys, a Something else field, then it locks on the pick and says what was picked.

On this page
Used for
  • Agent asks which one
  • Disambiguate a name
  • Pick a contract or file
  • Short pick in a chat turn

Examples

Installation

npx knowns-ui@latest add clarify-choice
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

question
ReactNode
The agent's question, one sentence. It names the radio group.
options
ClarifyOption[]
id, label, detail, meta, icon, disabled. Two to six read best; the first nine get a number key.
value / defaultValue
string | null
Defaultnull
The pick, controlled or not. Once set the cards lock.
onChoose
(id, option) => void
Called once with the pick. Continue the run from here.
onChange
() => void
Shows Change after the pick. Clear value to ask again.
other
{ label?, placeholder?, onSubmit }
A Something else field for an answer outside the list.
pickedLabel
(option) => ReactNode
Default"You picked {label}."
The line under the cards after the pick, read out politely.
shortcuts
boolean
Defaulttrue
Number keys 1 to 9 and their hints on the cards (hints only with a fine pointer).
columns
1 | 2
Default2
Two cards per row from 480px of container width.
disabled, className
-
Locks every card / on the card.

One column

Accessibility

  • The cards are a radio group named by the question, with one tab stop. Arrows move between them, by row in two columns; Enter or Space picks.
  • Number keys pick directly while focus is in the group. The key hints are hidden from screen readers and on touch screens.
  • After the pick the cards are disabled, the pick keeps its check and a polite live line names it.
  • Something else opens a labelled field; Escape closes it.

What it handles

  1. 01Asks one question over two to six cards, each with an icon, a label, a muted detail line and a value on the right.
  2. 02Puts the cards in two columns from 480px of container width, one below.
  3. 03Moves with the arrows as one radio group, picks with Enter, Space or the number keys 1 to 9.
  4. 04Locks on the pick: it keeps a ring and a check, the rest fade, and a line names it, with Change when you allow it.
  5. 05Adds a Something else field for an answer outside the list.
  6. 06Calls onChoose with the pick and never runs the agent itself; controlled or not.

States

First render
The cards at rest; nothing moves
none
Hover
The card's background tints
120ms, ease out
Pick
The other cards fade and the pick gets its ring
120ms, ease out
Reduced motion
The change is instant
0ms

Works with

When to use

When to use

  • An agent asking which one you meant when a request matches two customers, three contracts or several files, before it goes on.
  • A short pick inside a chat turn, with number keys and an answer outside the list.

When not to use

  • Approving a tool call the agent wants to run: use Approval Prompt.
  • Suggested follow-up questions after an answer: use AI Answer.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Clarify Choice to my app and wire it to my own data.
  • I need an agent asking which one you meant when a request matches two customers, three contracts or several files, before it goes on. Set that up with the Knowns UI Clarify Choice.
  • Which Clarify Choice props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "clarify-choice" }) and search_docs({ query: "clarify choice" }).

Need help?

Stuck on Clarify Choice, or found something off? We read every message.