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.

18 lines 753 B
import type { ReferenceType } from "../types.js"; import type { BaseUIChangeEventDetails } from "../../utils/createBaseUIEventDetails.js"; import { FloatingRootStore } from "../components/FloatingRootStore.js"; import { PopupTriggerMap } from "../../utils/popups/index.js"; export interface UseFloatingRootContextOptions { open?: boolean; onOpenChange?(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void; elements?: { reference?: ReferenceType | null; floating?: HTMLElement | null; triggers?: PopupTriggerMap; }; /** * Whether to prevent the auto-emitted `openchange` event. */ noEmit?: boolean; } export declare function useFloatingRootContext(options: UseFloatingRootContextOptions): FloatingRootStore;