Skip to content
fayeuiStatic / 0.1.0
LLMs
API / Static edition

@fayegram-ai/faye-ui/controls/autocomplete

Public exports and dependency-resolved component properties, with usage and rendering guidance.

Import

import { Autocomplete } from '@fayegram-ai/faye-ui/controls/autocomplete';

Usage and behavior guide · API JSON

This entry declares a client boundary. Follow the rendering guide for framework integration.

Public exports

NameKindResolved declaration type
Autocompletevalue{ readonly Root: typeof Base.Root; readonly List: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AutocompleteListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>; readonly Collection: typeof Base.Collection; readonly Value: typeof Base.Value; readonly useFilter: typeof import("@base-ui/react/internals/filter").getFilter; readonly useFilteredItems: typeof Base.useFilteredItems; readonly Portal: typeof Portal; readonly Input: { (input: Omit<import("@base-ui/react").AutocompleteInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & { variants?: { readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-var… (full type in API JSON)

Autocomplete

Public component; use the linked family guide for complete composition and behavior.

Dependency-resolved declaration properties. Common React/native HTML attributes are omitted from the table; use the full declaration and React/native references. Generic and union restrictions remain authoritative in TypeScript.

Autocomplete.Root

PropertyRequiredTypeMeaning
actionsRefNoReact.RefObject<AutocompleteRootActions | null> | undefinedA ref to imperative actions. - unmount: Manually unmounts the autocomplete. Call this after any externally controlled closing animation finishes.
autoHighlightNoboolean | "always" | undefinedWhether the first matching item is highlighted automatically. - true: highlight after the user types and keep the highlight while the query changes. - 'always': always highlight the first item.
childrenNoReact.ReactNodeSee the usage contract and declaration.
defaultOpenNoboolean | undefinedWhether the popup is initially open. To render a controlled popup, use the open prop instead.
defaultValueNostring | number | readonly string[] | undefinedThe uncontrolled input value of the autocomplete when it's initially rendered. To render a controlled autocomplete, use the value prop instead.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
filterNo((item: Items[number]["items"][number], query: string, itemToString?: ((item: Items[number]["items"][number]) => string) | undefined) => boolean) | null | undefinedFilter function used to match items against the input query.
filteredItemsNoreadonly Items[number]["items"][number][] | readonly Group<Items[number]["items"][number]>[] | undefinedFiltered items to display in the list. When provided, the list uses these items instead of filtering the items prop internally. When items is also provided, this array must preserve its flat or grouped structure. Nullish entries are not supported, as in items. Use when you want to control filtering logic externally with the useFilter() hook.
formNostring | undefinedIdentifies the form that owns the internal input. Useful when the autocomplete is rendered outside the form.
gridNoboolean | undefinedWhether list items are presented in a grid layout. When enabled, arrow keys navigate across rows and columns inferred from DOM rows.
highlightItemOnHoverNoboolean | undefinedWhether moving the pointer over items should highlight them. Disabling this prop allows CSS :hover to be differentiated from the :focus (data-highlighted) state.
idNostring | undefinedThe id of the component.
inlineNoboolean | undefinedWhether the list is rendered inline without using the component's own popup. Specify open unconditionally in conjunction with this prop so the list is considered visible: <Autocomplete.Root inline open>
inputRefNoReact.Ref<HTMLInputElement> | undefinedA ref to the hidden input element.
itemsYesItemsThe items to be displayed in the list. Can be either a flat array of items or an array of groups with items. Nullish entries are not supported: remove them from the data before passing it.
itemToStringValueNo((itemValue: Items[number]["items"][number]) => string) | undefinedWhen the item values are objects (<Autocomplete.Item value={object}>), this function converts the object value to a string representation for both display in the input and form submission. If the shape of the object is { value, label }, the label will be used automatically without needing to specify this prop.
keepHighlightNoboolean | undefinedWhether the highlighted item should be preserved when the pointer leaves the list.
limitNonumber | undefinedThe maximum number of items to display in the list.
localeNoIntl.LocalesArgumentThe locale to use for string comparison. Defaults to the user's runtime locale.
loopFocusNoboolean | undefinedWhether to loop keyboard focus back to the input when the end of the list is reached while using the arrow keys. The first item can then be reached by pressing <kbd>ArrowDown</kbd> again from the input, or the last item can be reached by pressing <kbd>ArrowUp</kbd> from the input. The input is always included in the focus loop per ARIA Authoring Practices. When disabled, focus does not move when on the last element and the user presses <kbd>ArrowDown</kbd>, or when on the first element and the user presses <kbd>ArrowUp</kbd>.
modalNoboolean | undefinedDetermines if the popup enters a modal state when open. - true: user interaction is limited to the popup: document page scroll is locked and pointer interactions on outside elements are disabled. - false: user interaction with the rest of the document is allowed. On touch devices, a true modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.
modeNo"list" | "none" | "inline" | "both" | undefinedControls how the autocomplete behaves with respect to list filtering and inline autocompletion. - list (default): items are dynamically filtered based on the input value. The input value does not change based on the active item. - both: items are dynamically filtered based on the input value, which will temporarily change based on the active item (inline autocompletion). - inline: items are static (not filtered), and the input value will temporarily change based on the active item (inline autocompletion). - none: items are static (not filtered), and the input value will not change based on the active item.
nameNostring | undefinedIdentifies the field when a form is submitted.
onItemHighlightedNo((highlightedValue: Items[number]["items"][number] | undefined, eventDetails: AutocompleteRootHighlightEventDetails) => void) | undefinedCallback fired when an item is highlighted or unhighlighted. Receives the highlighted item value (or undefined if no item is highlighted) and event details with a reason property describing why the highlight changed. The reason can be: - 'keyboard': the highlight changed due to keyboard navigation. - 'pointer': the highlight changed due to pointer hovering. - 'none': the highlight changed programmatically.
onOpenChangeNo((open: boolean, eventDetails: AutocompleteRootChangeEventDetails) => void) | undefinedEvent handler called when the popup is opened or closed.
onOpenChangeCompleteNo((open: boolean) => void) | undefinedEvent handler called after any animations complete when the popup is opened or closed.
onValueChangeNo((value: string, eventDetails: AutocompleteRootChangeEventDetails) => void) | undefinedEvent handler called when the input value of the autocomplete changes.
openNoboolean | undefinedWhether the popup is currently open. Use when controlled.
openOnInputClickNoboolean | undefinedWhether the popup opens when clicking the input.
readOnlyNoboolean | undefinedWhether the user should be unable to choose a different option from the popup.
requiredNoboolean | undefinedWhether the user must choose a value before submitting a form.
submitOnItemClickNoboolean | undefinedWhether clicking an item should submit the autocomplete's owning form. By default, clicking an item via a pointer or <kbd>Enter</kbd> key does not submit the owning form. Useful when the autocomplete is used as a single-field form search input.
valueNostring | number | readonly string[] | undefinedThe input value of the autocomplete. Use when controlled.
virtualizedNoboolean | undefinedWhether the items are being externally virtualized.

Autocomplete.List

PropertyRequiredTypeMeaning
childrenNoReactNode | ((item: any, index: number) => React.ReactNode)See the usage contract and declaration.
classNameNostring | ((state: ComboboxListState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxListState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxListState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.

Autocomplete.Collection

PropertyRequiredTypeMeaning
childrenYes(item: any, index: number) => React.ReactNodeSee the usage contract and declaration.

Autocomplete.Value

PropertyRequiredTypeMeaning
childrenNoReact.ReactNode | ((value: string) => React.ReactNode)See the usage contract and declaration.

Autocomplete.Portal

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxPortalState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
containerNoHTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null> | null | undefinedA parent element to render the portal element into.
keepMountedNoboolean | undefinedWhether to keep the portal mounted in the DOM while the popup is hidden.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxPortalState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxPortalState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.

Autocomplete.Input

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxInputState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxInputState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxInputState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.InputGroup

PropertyRequiredTypeMeaning
classNameNostring | ((state: AutocompleteInputGroupState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, AutocompleteInputGroupState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: AutocompleteInputGroupState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Trigger

PropertyRequiredTypeMeaning
classNameNostring | ((state: AutocompleteTriggerState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
nativeButtonNoboolean | undefinedWhether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (for example, <div>).
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, AutocompleteTriggerState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: AutocompleteTriggerState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Icon

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxIconState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxIconState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxIconState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Clear

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxClearState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
keepMountedNoboolean | undefinedWhether the component should remain mounted in the DOM when not visible.
nativeButtonNoboolean | undefinedWhether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (for example, <div>).
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxClearState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxClearState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Backdrop

Example disposition: Optional popup presentation. The picker example intentionally uses an unadorned nonmodal popup; these parts are documented without changing established picker geometry.

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxBackdropState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxBackdropState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxBackdropState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Positioner

PropertyRequiredTypeMeaning
alignNoAlign | undefinedHow to align the popup relative to the specified side.
alignOffsetNonumber | OffsetFunction | undefinedAdditional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties: - data.anchor: the dimensions of the anchor element with properties width and height. - data.positioner: the dimensions of the positioner element with properties width and height. - data.side: which side of the anchor element the positioner is aligned against. - data.align: how the positioner is aligned relative to the specified side.
anchorNoElement | VirtualElement | RefObject<Element | null> | (() => Element | VirtualElement | null) | null | undefinedAn element to position the popup against. By default, the popup will be positioned against the trigger.
arrowPaddingNonumber | undefinedMinimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
classNameNostring | ((state: ComboboxPositionerState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
collisionAvoidanceNoCollisionAvoidance | undefinedDetermines how to handle collisions when positioning the popup. side controls overflow on the preferred placement axis (top/bottom or left/right): - 'flip': keep the requested side when it fits; otherwise try the opposite side (top and bottom, or left and right). - 'shift': never change side; keep the requested side and move the popup within the clipping boundary so it stays visible. - 'none': do not correct side-axis overflow. align controls overflow on the alignment axis (start/center/end): - 'flip': keep side, but swap start and end when the requested alignment overflows. - 'shift': keep side and requested alignment, then nudge the popup along the alignment axis to fit. - 'none': do not correct alignment-axis overflow. fallbackAxisSide controls fallback behavior on the perpendicular axis when the preferred axis cannot fit: - 'start': allow perpendicular fallback and try the logical start side first (top before bottom, or left before right in LTR). - 'end': allow perpendicular fallback and try the logical end side first (bottom before top, or right before left in LTR). - 'none': do not fallback to the perpendicular axis. When side is 'shift', explicitly setting align only supports 'shift' or 'none'. If align is omitted, it defaults to 'flip'.
collisionBoundaryNoBoundary | undefinedAn element or a rectangle that delimits the area that the popup is confined to.
collisionPaddingNoPadding | undefinedAdditional space to maintain from the edge of the collision boundary.
disableAnchorTrackingNoboolean | undefinedWhether to disable the popup from tracking any layout shift of its positioning anchor.
positionMethodNo"absolute" | "fixed" | undefinedDetermines which CSS position property to use.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxPositionerState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
sideNoSide | undefinedWhich side of the anchor element to align the popup against. May automatically change to avoid collisions.
sideOffsetNonumber | OffsetFunction | undefinedDistance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties: - data.anchor: the dimensions of the anchor element with properties width and height. - data.positioner: the dimensions of the positioner element with properties width and height. - data.side: which side of the anchor element the positioner is aligned against. - data.align: how the positioner is aligned relative to the specified side.
stickyNoboolean | undefinedWhether to maintain the popup in the viewport after the anchor element was scrolled out of view.
styleNoCSSProperties | ((state: ComboboxPositionerState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Popup

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxPopupState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
finalFocusNoboolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null) | undefinedDetermines the element to focus when the popup is closed. - false: Do not move focus. - true: Move focus based on the default behavior (trigger or previously focused element). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, or false/undefined to do nothing.
initialFocusNoboolean | RefObject<HTMLElement | null> | ((openType: InteractionType) => void | boolean | HTMLElement | null) | undefinedDetermines the element to focus when the popup is opened. - false: Do not move focus. - true: Move focus based on the default behavior (first tabbable element or popup). - RefObject: Move focus to the ref element. - function: Called with the interaction type (mouse, touch, pen, or keyboard). Return an element to focus, true to use the default behavior, or false/undefined to do nothing.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxPopupState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxPopupState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Arrow

Example disposition: Optional popup presentation. The picker example intentionally uses an unadorned nonmodal popup; these parts are documented without changing established picker geometry.

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxArrowState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxArrowState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxArrowState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Status

Example disposition: Optional persistent live region for application-owned async suggestions. The same underlying status primitive is now exercised in the async Combobox example; free-form autocomplete currently demonstrates synchronous filtering.

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxStatusState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxStatusState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxStatusState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Empty

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxEmptyState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxEmptyState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxEmptyState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Row

Example disposition: Optional grid-list composition requiring root grid mode and explicit rows. Flat and grouped selection are demonstrated; two-dimensional arrow navigation remains a distinct coverage limit, not a completed visual scenario.

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxRowState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxRowState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxRowState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Item

PropertyRequiredTypeMeaning
childrenNoReactNodeSee the usage contract and declaration.
classNameNostring | ((state: AutocompleteItemState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
indexNonumber | undefinedThe index of the item in the list. Improves performance when specified by avoiding the need to calculate the index automatically from the DOM.
nativeButtonNoboolean | undefinedWhether the component renders a native <button> element when replacing it via the render prop. Set to true if the rendered element is a native button.
onClickNo((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void) | undefinedAn optional click handler for the item when selected. It fires when clicking the item with the pointer, as well as when pressing Enter with the keyboard if the item is highlighted when the Input or List element has focus.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, AutocompleteItemState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: AutocompleteItemState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueNoanyA unique value that identifies this item.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Group

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxGroupState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
itemsNoreadonly any[] | undefinedItems to be rendered within this group. When provided, child Collection components will use these items.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxGroupState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxGroupState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.GroupLabel

PropertyRequiredTypeMeaning
classNameNostring | ((state: ComboboxGroupLabelState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ComboboxGroupLabelState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: ComboboxGroupLabelState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Autocomplete.Separator

Example disposition: Optional visual separation within application-authored groups; flat suggestions intentionally have no separator.

PropertyRequiredTypeMeaning
classNameNostring | ((state: AutocompleteSeparatorState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
orientationNoOrientation | undefinedThe orientation of the separator.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, AutocompleteSeparatorState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: AutocompleteSeparatorState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly variant?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "variant"> | undefined; readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"autocomplete", "size"> | undefined; } | undefinedSee the usage contract and declaration.

Defaults and customization

Descriptor defaults: {"variant":"outline"}. Parts: input, input-group, trigger, icon, clear, backdrop, positioner, popup, arrow, status, empty, row, item, group, group-label, separator. Explicit instance props take precedence over configured defaults.

Use semantic tokens, public part hooks and customization sheets. Keep visual configuration separate from application state.

State, events and accessibility

For interactive controls, pair a controlled value/open prop with its corresponding change callback; default props initialize uncontrolled state. Keep application validation and submission policy explicit. Name controls with visible labels, name icon-only actions on the button, and preserve focus and dismissal behavior when replacing parts. Use native form names and submit/reset types where supported. See the usage guide for component-specific behavior and live examples.

Declaration authority

Generated from packages/faye-ui/dist/controls/autocomplete.d.ts after the semantic package build. Common native/React attributes are intentionally omitted from property tables. Generic overloads, discriminated unions and complete inherited attributes remain authoritative in installed TypeScript declarations. React DOM attributes and Base UI component contracts describe the inherited foundations.