interface MenuProps {
    anchorToClassName: string;
    className?: string;
    isMenuOpen?: boolean;
    items?: Omit<MenuItemProps, "onNavigate">[] | ReactNode[];
    onMenuOpenUpdate: ((isMenuOpen) => void);
    onNavigate: ((to) => void);
    placement?: "left" | "right" | "top" | "bottom" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | "bottom-end" | "bottom-start";
    size?: "compact" | "wide";
}

Properties

anchorToClassName: string

Anchor to an element

className?: string

Custom class to give the html component

isMenuOpen?: boolean

Display Menu

items?: Omit<MenuItemProps, "onNavigate">[] | ReactNode[]

Menu items

onMenuOpenUpdate: ((isMenuOpen) => void)

onMenuOpen callback

Type declaration

    • (isMenuOpen): void
    • onMenuOpen callback

      Parameters

      • isMenuOpen: boolean

      Returns void

onNavigate: ((to) => void)

onNavigate callback

Type declaration

    • (to): void
    • onNavigate callback

      Parameters

      • to: string

      Returns void

placement?: "left" | "right" | "top" | "bottom" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start" | "bottom-end" | "bottom-start"

Menu popup location relative to anchor element

size?: "compact" | "wide"

Controls padding and other menu size-related options

Generated using TypeDoc