XDSCommandPaletteInput@xds/core · CommandPalette

Usage

CommandPalette is a searchable dialog for quick access to commands, navigation, and actions. Use it as a keyboard-driven launcher powered by XDSSearchSource for filtering and selection.

Best practices

GuidancePractices
DoProvide a searchSource with bootstrap results so users see useful options before typing.
DoUse auxiliaryData.group on items to automatically organize results into labeled sections.
Don'tUse CommandPalette for simple dropdowns or menus — use XDSMenu or XDSSelector for inline selections.
Don'tAdd too many groups or items — curate results to keep the palette fast and scannable.

Import

ts
import {XDSCommandPaletteInput} from '@xds/core/CommandPalette'

Props

PropTypeDescription
placeholder
string (default: 'Search...')Placeholder text for the input.
hasAutoFocus
boolean (default: true)Auto-focus the input when mounted.
endContent
ReactNodeContent rendered at the trailing end of the input, after the spinner. Use for clear buttons or keyboard shortcut hints.
value
stringSearch value. When omitted inside XDSCommandPalette, reads from context.
onValueChange
(value: string) => voidCalled when search value changes. When omitted inside XDSCommandPalette, writes to context.
xstyle
StyleXStylesStyleX styles for layout customization. Must be a stylex.create() value.