Skip to content

Floating beta ​

Function of @v12-engine/client/kit

ts
export declare function Floating(props: {
    anchor: Element | {
        x: number;
        y: number;
    };
    placement?: TipPlacement;
    kind?: 'tooltip' | 'menu' | 'popover';
    class?: string;
    role?: 'menu' | 'dialog' | 'listbox';
    onDismiss: () => void;
    children: JSX.Element;
    mount?: Element;
    ark?: Partial<Omit<Ark.RootProps, 'children' | 'open'>>;
}): JSX.Element;

What floats by an element or a point of the screen while it is there, over everything, and goes away on a press outside it or Escape (onDismiss): for what is opened from code, with nothing pressed to open it