UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

38 lines 1.21 kB
import * as React from 'react'; import { BaseUIComponentProps } from "../../utils/types.js"; import type { FieldRoot } from "../../field/root/FieldRoot.js"; import type { Side } from "../../utils/useAnchorPositioning.js"; /** * A text input to search for items in the list. * Renders an `<input>` element. */ export declare const ComboboxInput: React.ForwardRefExoticComponent<ComboboxInputProps & React.RefAttributes<HTMLInputElement>>; export interface ComboboxInputState extends FieldRoot.State { /** * Whether the corresponding popup is open. */ open: boolean; /** * Indicates which side the corresponding popup is positioned relative to its anchor. */ popupSide: Side | null; /** * Present when the corresponding items list is empty. */ listEmpty: boolean; /** * Whether the component should ignore user edits. */ readOnly: boolean; } export interface ComboboxInputProps extends BaseUIComponentProps<'input', ComboboxInput.State> { /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean; } export declare namespace ComboboxInput { type State = ComboboxInputState; type Props = ComboboxInputProps; }