tuil
ReferenceComponentsForms and controls

AutocompleteProps

AutocompleteProps component contract.

View rawEdit

Type

export interface AutocompleteProps<T extends string = string>
  extends Omit<SelectionProps<T>, "searchable"> {
  readonly field?: AdaptedTanStackField<string>;
  readonly validators?: FieldValidators<string>;
  readonly onBlur?: () => void | Promise<void>;
  readonly value?: string;
  readonly defaultValue?: string;
  readonly onValueChange?: (value: string) => void | Promise<void>;
  readonly onOptionSelect?: (option: SelectOption<T>) => void | Promise<void>;
}

Members

MemberTypeRequiredDescriptionRelated types
fieldAdaptedTanStackField<string> | undefinedNoThe field member uses the AdaptedTanStackField<string> | undefined contract.AdaptedTanStackField
validatorsFieldValidators<string> | undefinedNoThe validators member uses the FieldValidators<string> | undefined contract.FieldValidators
onBlur(() => void | Promise<void>) | undefinedNoThe onBlur member uses the (() => void | Promise<void>) | undefined contract.
valuestring | undefinedNoThe value member uses the string | undefined contract.
defaultValuestring | undefinedNoThe defaultValue member uses the string | undefined contract.
onValueChange((value: string) => void | Promise<void>) | undefinedNoThe onValueChange member uses the ((value: string) => void | Promise<void>) | undefined contract.
onOptionSelect((option: SelectOption<T>) => void | Promise<void>) | undefinedNoThe onOptionSelect member uses the ((option: SelectOption<T>) => void | Promise<void>) | undefined contract.
optionsreadonly SelectOption<T>[]YesThe options member uses the readonly SelectOption<T>[] contract.
placeholderstring | undefinedNoThe placeholder member uses the string | undefined contract.
autoFocusboolean | undefinedNoThe autoFocus member uses the boolean | undefined contract.
variantstring | undefinedNoThe variant member uses the string | undefined contract.
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.
classNamestring | undefinedNoThe className member uses the string | undefined contract.
layoutPartial<Omit<LayoutNodeInput, "id" | "children" | "semantics">> | undefinedNoThe layout member uses the Partial<Omit<LayoutNodeInput, "id" | "children" | "semantics">> | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
testIdstring | undefinedNoThe testId member uses the string | undefined contract.
roleSemanticRole | undefinedNoThe role member uses the SemanticRole | undefined contract.SemanticRole
labelstring | undefinedNoThe label member uses the string | undefined contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
disabledboolean | undefinedNoThe disabled member uses the boolean | undefined contract.
readOnlyboolean | undefinedNoThe readOnly member uses the boolean | undefined contract.
selectedboolean | undefinedNoThe selected member uses the boolean | undefined contract.
checkedboolean | undefinedNoThe checked member uses the boolean | undefined contract.
expandedboolean | undefinedNoThe expanded member uses the boolean | undefined contract.
valueTextstring | undefinedNoThe valueText member uses the string | undefined contract.
slotsPartial<SlotComponents<&#123; root: import("ink").BoxProps; indicator: import("ink").TextProps; list: import("ink").BoxProps; option: import("ink").TextProps; empty: import("ink").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import("ink").BoxProps; indicator: import("ink").TextProps; list: import("ink").BoxProps; option: import("ink").TextProps; empty: import("ink").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import("ink").BoxProps; indicator: import("ink").TextProps; list: import("ink").BoxProps; option: import("ink").TextProps; empty: import("ink").TextProps; &#125;, object>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import("ink").BoxProps; indicator: import("ink").TextProps; list: import("ink").BoxProps; option: import("ink").TextProps; empty: import("ink").TextProps; &#125;, object>> | undefined contract.BoxProps, SlotProps, TextProps

Source

View the secondary source reference

On this page