@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.
20 lines (19 loc) • 752 B
TypeScript
import * as React from 'react';
import type { FloatingContext } from '@floating-ui/react';
import type { Side } from '../../utils/useAnchorPositioning.js';
export interface MenuPositionerContext {
/**
* The side of the anchor element the popup is positioned relative to.
*/
side: Side;
/**
* How to align the popup relative to the specified side.
*/
align: 'start' | 'end' | 'center';
arrowRef: React.MutableRefObject<Element | null>;
arrowUncentered: boolean;
arrowStyles: React.CSSProperties;
floatingContext: FloatingContext;
}
export declare const MenuPositionerContext: React.Context<MenuPositionerContext | undefined>;
export declare function useMenuPositionerContext(): MenuPositionerContext;