Thinking UI

Agent PickerPRO

Choose an assistant or persona from cards with a gliding highlight, or from a compact dropdown.

Code

2 files · 556 lines of TypeScriptPRO

Agent Picker is part of Pro

Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.

Motion notes

  • The selected card's fill is one shared layout element, so it glides between cards on the layout spring instead of fading out here and in there.
  • The chosen agent's avatar smiles, its radio mark pops and draws a check, and its capability chips ripple up one stagger step apart, so selection lands as a small moment.
  • The dropdown reuses the same idea: a hover highlight slides between options, the trigger's avatar and name swap vertically, and the avatar looks around while the list is open.
  • Cards follow the radiogroup pattern (arrows move by column and row, Home/End jump); the dropdown is a listbox with active-descendant keys, Escape and outside-press to close. With reduced motion, highlights snap and entrances are skipped.

Usage

Example
<AgentPicker
    agents={[
      { id: "atlas", name: "Atlas", skill: "Everyday questions", capabilities: ["Chat", "Web"] },
      { id: "forge", name: "Forge", skill: "Writes and runs code", capabilities: ["Code", "Files"] },
    ]}
    value={agentId}
    onValueChange={setAgentId}
  />

  <AgentPicker variant="dropdown" agents={agents} value={agentId} onValueChange={setAgentId} />

Props

PropTypeDefaultDescription
agents{ id, name, skill, capabilities?, avatar? }[]—Agents to choose from. avatar replaces the default animated Agent Avatar.
valuestring—Controlled selected agent id.
defaultValuestring—Initial selection when uncontrolled. Defaults to the first agent.
onValueChange(id: string) => void—Called when the selection changes.
variant"cards" | "dropdown""cards"Cards for a picker screen, or a compact dropdown for a toolbar.
columns1 | 22Card columns.
labelstring"Assistant"Accessible name for the group or listbox.
openboolean—Dropdown only: controlled open state.
defaultOpenbooleanfalseDropdown only: initial open state.
onOpenChange(open: boolean) => void—Dropdown only: called when the list opens or closes.
activeIdstring—Dropdown only: controlled highlighted option.
onActiveIdChange(id: string) => void—Dropdown only: called as the highlight moves.
classNamestring—Classes for the grid or the dropdown wrapper.