Skip to content
caliper ui pro docs

Agent chat input

A prompt box with model, tool toggles and suggestions around it.

Pro

Try one

When to use

  • The main entry point of an agent screen.
  • You need controls beside the text field.

When not to use

  • A plain message box is enough; use the prompt input.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/agent-chat-input

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

AgentChatInput

9 props
PropTypeDefault
commands *readonly AgentCommand[]—
mentions *readonly AgentMention[]—
mode *AgentMode—
onModeChange *(mode: AgentMode) => void—
onSubmit *(text: string, mode: AgentMode) => void—
onStop(() => void)—
runningboolean—
placeholderstring"Tell the agent what to do"
classNamestring—

Keyboard

↓
Moves to the next item or value.
↑
Moves to the previous item or value.
Enter
Activates the focused control.
Tab
Moves focus through the part's focusable elements.
Escape
Closes or cancels, then returns focus to where it came from.

Accessibility

It exposes listbox, option, combobox, radiogroup and radio semantics, with aria-label, aria-selected, aria-expanded, aria-controls, aria-activedescendant and aria-autocomplete kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/agent-chat-input.md

The index of every part is at /llms.txt.

More in Assistant screens