UNPKG

@base-ui/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.

43 lines 1.46 kB
import type * as React from 'react'; import type { FieldRootState } from "../../field/root/FieldRoot.js"; import type { Side } from "../../utils/useAnchorPositioning.js"; import type { BaseUIComponentProps, NativeButtonProps } from "../../internals/types.js"; /** * A button that opens the popup. * Renders a `<button>` element. * * Documentation: [Base UI Autocomplete](https://base-ui.com/react/components/autocomplete) */ export declare const AutocompleteTrigger: AutocompleteTrigger; export interface AutocompleteTriggerState extends FieldRootState { /** * Whether the popup is open. */ open: boolean; /** * Whether the component should ignore user interaction. */ disabled: 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; } export interface AutocompleteTriggerProps extends NativeButtonProps, BaseUIComponentProps<'button', AutocompleteTriggerState> { /** * Whether the component should ignore user interaction. * @default false */ disabled?: boolean | undefined; } export interface AutocompleteTrigger { (componentProps: AutocompleteTriggerProps & React.RefAttributes<HTMLButtonElement>): React.JSX.Element; } export declare namespace AutocompleteTrigger { type State = AutocompleteTriggerState; type Props = AutocompleteTriggerProps; }