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.

37 lines (36 loc) 1.45 kB
import * as React from 'react'; import type { Side, Align } from '../../utils/useAnchorPositioning.js'; import type { BaseUIComponentProps } from '../../utils/types.js'; import type { TransitionStatus } from '../../utils/useTransitionStatus.js'; import { InteractionType } from '../../utils/useEnhancedClickHandler.js'; /** * A container for the popover contents. * Renders a `<div>` element. * * Documentation: [Base UI Popover](https://base-ui.com/react/components/popover) */ declare const PopoverPopup: React.ForwardRefExoticComponent<PopoverPopup.Props & React.RefAttributes<HTMLDivElement>>; declare namespace PopoverPopup { interface State { /** * Whether the popover is currently open. */ open: boolean; side: Side; align: Align; transitionStatus: TransitionStatus; } interface Props extends BaseUIComponentProps<'div', State> { /** * Determines the element to focus when the popover is opened. * By default, the first focusable element is focused. */ initialFocus?: React.RefObject<HTMLElement | null> | ((interactionType: InteractionType) => React.RefObject<HTMLElement | null>); /** * Determines the element to focus when the popover is closed. * By default, focus returns to the trigger. */ finalFocus?: React.RefObject<HTMLElement | null>; } } export { PopoverPopup };