Comma Agents
@comma-agents/tuiComponents

SearchInput

Single-line search input with bordered box, caret prompt, and placeholder.

SearchInput

A single-line controlled text input designed for search/filter use cases. Renders a bordered box with a > caret prompt followed by the query text (or dimmed placeholder text).

import { SearchInput } from "@comma-agents/tui";

<SearchInput
  value={query}
  onChange={setQuery}
  placeholder="Search commands..."
  id="palette-search"
/>

SearchInputProps

PropTypeDefaultDescription
valuestring--Controlled query string
onChange(next: string) => void--Called when the value changes
placeholderstring"Search..."Placeholder shown when value is empty
promptstring"> "Caret prompt text
idstring--Focus ID for programmatic focusing

Printable characters are appended to the query. Backspace / Delete removes the last character. SGR mouse escape sequences are swallowed. Navigation keys (arrows, Enter, Escape, Tab) are intentionally not handled -- the parent component owns list navigation and dismissal.

On this page