@dxos/react-ui
    Preparing search index...

    Ark's positioning less sameWidth; an interface, so declarations name it rather than expanding floating-ui's types.

    interface Positioning {
        applyStyles?: boolean;
        arrowPadding?: number;
        boundary?: (() => Boundary) | Boundary | "clipping-ancestors";
        fitViewport?: boolean;
        flip?: boolean | Placement[];
        getAnchorElement?: () => null | HTMLElement | VirtualElement;
        getAnchorRect?: (
            element: null | HTMLElement | VirtualElement,
        ) => null | AnchorRect;
        gutter?: number;
        hideWhenDetached?: boolean;
        listeners?: boolean | AutoUpdateOptions;
        offset?: { crossAxis?: number; mainAxis?: number };
        onComplete?: (data: ComputePositionReturn) => void;
        onPositioned?: (data: { placed: boolean }) => void;
        overflowPadding?: number;
        overlap?: boolean;
        placement?: Placement;
        restoreStyles?: boolean;
        shift?: number;
        sizeMiddleware?: boolean;
        slide?: boolean;
        strategy?: "fixed" | "absolute";
        updatePosition?: (
            data: {
                floatingElement: null | HTMLElement;
                updatePosition: () => Promise<void>;
            },
        ) => void
        | Promise<void>;
    }

    Hierarchy

    • Omit<NonNullable<SelectPrimitive.RootProps<Option>["positioning"]>, "sameWidth">
      • Positioning
    Index

    Properties

    applyStyles?: boolean

    Whether to apply computed position styles (--x, --y, --z-index) to the floating element. Set to false when the consumer applies these from context (e.g. for exit animations).

    true
    
    arrowPadding?: number

    The minimum padding between the arrow and the floating element's corner.

    4
    
    boundary?: (() => Boundary) | Boundary | "clipping-ancestors"

    The overflow boundary of the reference element Accepts a function returning a Boundary, a Boundary directly, or the shorthand string 'clipping-ancestors' which maps to Floating UI's 'clippingAncestors'.

    fitViewport?: boolean

    Whether the popover should fit the viewport.

    flip?: boolean | Placement[]

    Whether to flip the placement

    getAnchorElement?: () => null | HTMLElement | VirtualElement

    Function that returns the anchor element. Useful when you want to use a different element as the anchor.

    getAnchorRect?: (
        element: null | HTMLElement | VirtualElement,
    ) => null | AnchorRect

    Function that returns the anchor rect

    Use getAnchorElement instead

    gutter?: number

    The main axis offset or gap between the reference and floating elements

    hideWhenDetached?: boolean

    Whether the popover should be hidden when the reference element is detached

    listeners?: boolean | AutoUpdateOptions

    Options to activate auto-update listeners

    offset?: { crossAxis?: number; mainAxis?: number }

    The offset of the floating element

    onComplete?: (data: ComputePositionReturn) => void

    Function called when the placement is computed

    onPositioned?: (data: { placed: boolean }) => void

    Function called when the floating element is positioned or not

    overflowPadding?: number

    The virtual padding around the viewport edges to check for overflow

    overlap?: boolean

    Whether the floating element can overlap the reference element

    false
    
    placement?: Placement

    The initial placement of the floating element

    restoreStyles?: boolean

    Whether styles applied by the positioning utility should be restored on cleanup.

    shift?: number

    The secondary axis offset or gap between the reference and floating elements

    sizeMiddleware?: boolean

    Whether to use the size middleware from Floating UI. It computes and sets CSS variables (--reference-width, --reference-height, --available-width, --available-height) used by sameWidth and fitViewport.

    Disabling it improves scroll performance with heavy content by avoiding layout thrashing on each update. Only applies when both sameWidth and fitViewport are false — the middleware is always used when either is enabled.

    true
    
    slide?: boolean

    Whether the popover should slide when it overflows.

    strategy?: "fixed" | "absolute"

    The strategy to use for positioning

    updatePosition?: (
        data: {
            floatingElement: null | HTMLElement;
            updatePosition: () => Promise<void>;
        },
    ) => void
    | Promise<void>

    A callback that will be called when the popover needs to calculate its position.