UNPKG

geist-ui-svelte

Version:

<img src="./src/lib/assets/demo-page.png">

15 lines (14 loc) 620 B
export type PlaceOptions = { placement: Placement; /** When the element overflows the screen it will flip to the other side */ flip: boolean; offset: Offset; }; export type Offset = { /** offset away from the anchor */ x: number; /** Y offset away from the anchor */ y: number; }; export type Placement = "bottom" | "bottom-end" | "bottom-start" | "top" | "top-end" | "top-start" | "right" | "right-start" | "right-end" | "left" | "left-start" | "left-end"; export declare const place: (anchor: HTMLElement, element: HTMLElement, { placement, flip, offset }: PlaceOptions) => Placement;