label | string · requiredAccessible label for the input. |
|---|
searchSource | SearchSource<T> · requiredData source providing search and bootstrap methods for populating the dropdown. |
|---|
value | T | null · requiredCurrently selected item, or null if nothing is selected. |
|---|
onChange | (item: T | null) => void · requiredCalled when the selection changes. |
|---|
placeholder | stringInput placeholder text. |
|---|
hasEntriesOnFocus | boolean · default falseShow bootstrap results on focus before typing. |
|---|
hasClear | boolean · default trueShow clear button to deselect the current value. |
|---|
isDisabled | boolean · default falseDisables the input. |
|---|
disabledMessage | stringExplains why the input is disabled. With isDisabled, shows a tooltip on hover/keyboard focus and keeps the field focusable via aria-disabled (activation stays blocked). Use this instead of wrapping a disabled Typeahead in Tooltip. Disabled controls swallow the hover events an external Tooltip needs. |
|---|
maxMenuItems | number · default 10Maximum number of dropdown items to display. |
|---|
minQueryLength | number · default 1Minimum query length before the search source is queried. Below it no search runs and the menu stays closed. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string}Validation status object with type and message for error/warning/success states. |
|---|
statusVariant | 'attached' | 'detached' · default 'attached'How the status message is placed relative to the input. attached overlaps directly below the input (bordered treatment); detached floats below as a separate element with spacing. |
|---|
renderItem | (item: T) => ReactNodeCustom render function for dropdown items. Default renders TypeaheadItem. |
|---|
isLabelHidden | boolean · default falseVisually hides the label while keeping it accessible. |
|---|
description | stringHelper text displayed below the label. |
|---|
isRequired | boolean · default falseMarks the field as required. |
|---|
isOptional | boolean · default falseShows an optional indicator on the label. |
|---|
labelTooltip | string |
|---|
emptySearchResultsText | string · default 'No results found'Text shown when search returns no results. |
|---|
hasAutoFocus | boolean · default falseAuto-focus the input on mount. |
|---|
size | 'sm' | 'md' | 'lg' · default 'md'Input and token size. |
|---|
debounceMs | number · default 150Debounce delay in ms before triggering search. Set to 0 for synchronous sources. |
|---|
onChangeQuery | (query: string) => voidCallback fired when the search query text changes. |
|---|
onOpenChange | (isOpen: boolean) => voidCallback when the dropdown opens or closes. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. |
|---|
startIcon | IconType | ReactNodeSVG icon component displayed at the start of the input. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value: not an inline style object like style={{}}. |
|---|